home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / news / readers / nnr / source.vers130.Z / source.vers130
Encoding:
Text File  |  1993-01-11  |  596.9 KB  |  7,547 lines

  1. :READ  NNR      $EXEC    D2 NNR130 05/09/92 14:13:14                            
  2. /**------------------------------------------------------------------**/00001000
  3. /** Network News Reader                                              **/00002000
  4. /** file - nnr exec                                                  **/00003000
  5. /**                                                 Main driver exec **/00004000
  6. /**------------------------------------------------------------------**/00005000
  7. /**********************************************************************)00006000
  8. (*    Network News Reader/VM (NNR) is a client implementation of      *)00007000
  9. (*       Network News Transfer Protocol (NNTP) a.k.a RFC 977          *)00008000
  10. (**********************************************************************/00009000
  11. /*========================== NNR HISTORY =============================*/00010000
  12. /* 08/21/91 M_1.2.0                                                   */00011000
  13. /* 09/02/91 disk full test (for "Groups Read")                        */00012000
  14. /* 09/16/91 M_1.2.1                                                   */00013000
  15. /* 10/10/91 Replace MAIL and POST screens                             */00014000
  16. /* 10/10/91 M_1.2.2                                                   */00015000
  17. /* 11/29/91 M_1.2.2a                                                  */00016000
  18. /* 12/10/91 added line limit                                          */00017000
  19. /* 12/21/91 added log/nolog from COURCOUL@VMTECQRO.QRO.ITESM.MX       */00018000
  20. /* 12/21/91 *_1.2.2b                                                  */00019000
  21. /* 01/28/92 *_1.2.2c                                                  */00020000
  22. /*          * add post as a parameter to nnr                          */00021000
  23. /*          * add multiple server capability                          */00022000
  24. /* 03/31/92 *_1.2.2d                                                  */00023000
  25. /*          * edit mode s  (in nnr sitefix)                           */00024000
  26. /*          * add multiple personal subscriptions                     */00025000
  27. /* 05/09/92 *_1.2.2e                                                  */00026000
  28. /*=========================== HISTORY ================================*/00027000
  29. /**                                                                     00028000
  30.     Copyright (C) 1991  Paul J. Campbell                                00029000
  31.                                                                         00030000
  32.     This program is free software; you can redistribute it and/or modify00031000
  33.     it under the terms of the MITRE Corporation General Public License a00032000
  34.     published by the MITRE Corporation                                  00033000
  35.                                                                         00034000
  36.     This program is distributed in the hope that it will be useful,     00035000
  37.     but WITHOUT ANY WARRANTY; without even the implied warranty of      00036000
  38.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the       00037000
  39.     MITRE General Public License for more details.                      00038000
  40.                                                                         00039000
  41.     You should have received a copy of the MITRE General Public License 00040000
  42.     along with this program; if not, write to the MITRE Corporation.    00041000
  43.                                                                         00042000
  44. **/                                                                     00043000
  45. /**********************************************************************)00044000
  46. (* Request:                                                           *)00045000
  47. (*   Please send any suggestions/corrections/questions/additions to:  *)00046000
  48. (*                                                                    *)00047000
  49. (*   Paul Campbell, MS B020      campbell@mitre.org                   *)00048000
  50. (*   The MITRE Corporation       pc@mbunix.mitre.org                  *)00049000
  51. (*   Burlington Road                                                  *)00050000
  52. (*   Bedford, MA 01730                                                *)00051000
  53. (*                                                                    *)00052000
  54. (**********************************************************************/00053000
  55. trace(o)                                                                00054000
  56. address command                                                         00055000
  57. 'EXEC LINKPROD TCPIP'               /*$$$ production link to IBM's FAL*/00056000
  58. parse arg arguments '(' options                                         00057000
  59. low='abcdefghijklmnopqrstuvwxyz'                                        00058000
  60. upp='ABCDEFGHIJKLMNOPQRSTUVWXYZ'                                        00059000
  61. 'SET CMSTYPE HT'                                                        00060000
  62. 'NUCXDROP EMULSTSM'                                                     00061000
  63. 'SET CMSTYPE RT'                                                        00062000
  64. 'GLOBALV SELECT VMNNTP'                                                 00063000
  65. call Get_Parms                                                          00064000
  66. call Get_Args                                                           00065000
  67. call Set_Globalv                                                        00066000
  68. if ipaddr^='' then                                                      00067000
  69.  'GLOBALV SETL IPADDR' ipaddr                                           00068000
  70. 'GLOBALV GET IPADDR'                                                    00069000
  71. parse var ipaddr oct1 '.' oct2 '.' oct3 '.' oct4                        00070000
  72. servaddr=right('0'||d2x(oct1),2)||,                                     00071000
  73.          right('0'||d2x(oct2),2)||,                                     00072000
  74.          right('0'||d2x(oct3),2)||,                                     00073000
  75.          right('0'||d2x(oct4),2)                                        00074000
  76. call Verbiage                                                           00075000
  77. Call Groups2IP(servaddr) /* temporary measure for multiple servers */   00076000
  78. call Prep_Print                                                         00077000
  79. call Main                                                               00078000
  80. 'GLOBALV GET STATUS'                                                    00079000
  81. if ^postonly then                                                       00080000
  82.   do                                                                    00081000
  83.     call Clean_Up                                                       00082000
  84.     call Check_Print                                                    00083000
  85.   end                                                                   00084000
  86. 'GLOBALV SELECT VMNNTP PURGE'                                           00085000
  87. exit(word(status,1))                                                    00086000
  88. /*-----------------------------------------------------------------*/   00087000
  89. /* get the parameters                                              */   00088000
  90. /*-----------------------------------------------------------------*/   00089000
  91. Get_Parms:                                                              00090000
  92.   options=translate(options)                                            00091000
  93.   parse var options 'MAINT' maint .                                     00092000
  94.   parse var options 'ARTICLES' number .                                 00093000
  95.   parse var options 'LINES' lines .                                     00094000
  96.   parse var options 'HEADERS' headers .                                 00095000
  97.   parse var options 'NEWS' newnews .                                    00096000
  98.   parse var options 'DAYSBACK' daysback .                               00097000
  99.   logposts= ^max(0,min(1,find(options,'NOLOG')))                        00098000
  100.   postonly= max(0,min(1,find(options,'POST')))                          00099000
  101.   parse var options 'IPADDR' ipaddr .                                   00100000
  102.   if ABBREV('YES',maint,1) then                                         00101000
  103.     do                                                                  00102000
  104.       say '"MAINT" has been superseded by the "Sub/UnS" PFK!'           00103000
  105.       exit(0)                                                           00104000
  106.     end                                                                 00105000
  107.   if verify(number,'0123456789')^=0 then number=300                     00106000
  108.   if number='' then number=300                                          00107000
  109.   if verify(lines,'0123456789')^=0 then lines=1500                      00108000
  110.   if lines='' then lines=1500                                           00109000
  111.   if ABBREV('NO',headers,1) then                                        00110000
  112.     headers='BODY'                                                      00111000
  113.   else                                                                  00112000
  114.     headers='ARTICLE'                                                   00113000
  115.   if ABBREV('ALL',newnews,1) then                                       00114000
  116.     newnews='0'                                                         00115000
  117.   else                                                                  00116000
  118.     newnews='1'                                                         00117000
  119.   if verify(daysback,'0123456789')^=0 then daysback=7                   00118000
  120.   if daysback='' then daysback=7                                        00119000
  121.   if verify(ipaddr,'0123456789.')^=0 then                               00120000
  122.     do                                                                  00121000
  123.       say '"'ipaddr'" is an invalid form of ip address, using default!' 00122000
  124.       ipaddr=''                                                         00123000
  125.     end                                                                 00124000
  126. return                                                                  00125000
  127. /*-----------------------------------------------------------------*/   00126000
  128. /* get the arguments                                               */   00127000
  129. /*-----------------------------------------------------------------*/   00128000
  130. Get_Args:                                                               00129000
  131.  'GLOBALV SETL NEWSGROUP' strip(arguments)                              00130000
  132.  if arguments='' then return                                            00131000
  133.  if words(arguments)> 1 then                                            00132000
  134.    do                                                                   00133000
  135.      say 'We only accept 1 group as an argument, processing will',      00134000
  136.          ' continue as normal.'                                         00135000
  137.      'GLOBALV SETL NEWSGROUP'                                           00136000
  138.    end                                                                  00137000
  139. Return                                                                  00138000
  140. /*-----------------------------------------------------------------*/   00139000
  141. /* set/initialize all requisite global variables                   */   00140000
  142. /*-----------------------------------------------------------------*/   00141000
  143. Set_Globalv:                                                            00142000
  144.  'GLOBALV SETL THISNODE Yournode.Domain.Ext'         /*$$$ Your Domain*/00143000
  145.  'GLOBALV SETL ORGANIZATION Your Organization' /*$$$ Your Organization*/00144000
  146.  'GLOBALV SETL MAILER XMAILER'           /*$$$ Columbia MAILER or SMTP*/00145000
  147.  'GLOBALV SETL IPADDR 000.000.000.000'      /*$$$ IP address of server*/00146000
  148.  'GLOBALV SETL PARM' arguments '(' options                              00147000
  149.  'GLOBALV SET VERSION S_1.2.2e'                                         00148000
  150.  'GLOBALV SET STATUS OK'                                                00149000
  151.  'GLOBALV SET PROBLEM'                                                  00150000
  152.  'GLOBALV SET DISKFULL NO'                                              00151000
  153.  'GLOBALV SET SUBJECT'                                                  00152000
  154.  'GLOBALV SET NUMBER' number                                            00153000
  155.  'GLOBALV SET LINES' lines                                              00154000
  156.  'GLOBALV SET HEADERS' headers                                          00155000
  157.  'GLOBALV SET NEWNEWS' newnews                                          00156000
  158.  'GLOBALV SET PRINT 0'                                                  00157000
  159.  'GLOBALV SET DAYSBACK' daysback                                        00158000
  160.  'GLOBALV SET SOCKET'                                                   00159000
  161.  'GLOBALV SET LOGPOSTS' logposts                                        00160000
  162.  'GLOBALV SET POSTONLY' postonly                                        00161000
  163.  'GLOBALV SET CURRHLIQ OFF'                                             00162000
  164. return                                                                  00163000
  165. /*-----------------------------------------------------------------*/   00164000
  166. /* clean up utility files                                         */    00165000
  167. /*-----------------------------------------------------------------*/   00166000
  168. Clean_up:                                                               00167000
  169.  'GLOBALV GET DISKFULL'                                                 00168000
  170.  'GLOBALV GET IPADDR'                                                   00169000
  171.  if diskfull ^= 'NO' then                                               00170000
  172.    do                                                                   00171000
  173.      say "Cannot save session activity (disk is full)!"                 00172000
  174.      'SET CMSTYPE HT'                                                   00173000
  175.      'ERASE Groups New A'                                               00174000
  176.      'SET CMSTYPE RT'                                                   00175000
  177.      return                                                             00176000
  178.    end                                                                  00177000
  179.  'SET CMSTYPE HT'                                                       00178000
  180.  'RENAME' servaddr 'NNReader A Groups Temp A'                           00179000
  181.  'RENAME Groups New A' servaddr 'NNReader A'                            00180000
  182.   if rc^=0 then                                                         00181000
  183.    'RENAME Groups Temp A' servaddr 'NNReader A'                         00182000
  184.  'ERASE Groups Temp A'                                                  00183000
  185.  'SET CMSTYPE RT'                                                       00184000
  186. return                                                                  00185000
  187. /*-----------------------------------------------------------------*/   00186000
  188. /* main routine                                                   */    00187000
  189. /*-----------------------------------------------------------------*/   00188000
  190. Main:                                                                   00189000
  191.   'GLOBALV GET NEWSGROUP'                                               00190000
  192.   Call NewGroups(servaddr)                                              00191000
  193.   say 'Collecting Network News...'                                      00192000
  194.   'XEDIT $NNTP$ $LISTS$ S (PROFILE NNR$XEDI'    /*$$$ XEDIT version or*/00193000
  195. return                                                                  00194000
  196. /*-----------------------------------------------------------------*/   00195000
  197. /* stack date and time of last server access for NEWGROUPS          */  00196000
  198. /*-----------------------------------------------------------------*/   00197000
  199. NewGroups: Procedure                                                    00198000
  200. arg servaddr                                                            00199000
  201.    'GLOBALV GET DAYSBACK'                                               00200000
  202.    mmddyy=date('U')                                                     00201000
  203.    hhmmss=time()                                                        00202000
  204.    'SET CMSTYPE HT'                                                     00203000
  205.    'LISTFILE' servaddr 'NNReader A (LABEL LIFO'                         00204000
  206.    lrc=rc                                                               00205000
  207.    'SET CMSTYPE RT'                                                     00206000
  208.    if lrc=0 then                                                        00207000
  209.      do                                                                 00208000
  210.        pull line                                                        00209000
  211.        parse var line . . . . . . . mmddyy hhmmss .                     00210000
  212.      end                                                                00211000
  213.    parse var mmddyy month '/' day '/' year                              00212000
  214.    parse var hhmmss hour ':' minute ':' second                          00213000
  215.    yymmdd=year||right('0'||month,2)||day                                00214000
  216.    hhmmss=right('0'||hour,2)||minute||second                            00215000
  217.    weekagoyymmdd=weekago(daysback)                                      00216000
  218.    if weekagoyymmdd<yymmdd then yymmdd=weekagoyymmdd                    00217000
  219.    'GLOBALV SETL NGDATE' hhmmss yymmdd                                  00218000
  220.    'GLOBALV SET YYMMDD' substr(yymmdd,3,2)||'/'||substr(yymmdd,5,2)||,  00219000
  221.                         '/'||substr(yymmdd,1,2)                         00220000
  222. return                                                                  00221000
  223. /*-----------------------------------------------------------------*/   00222000
  224. /* Set up virtual printer                                         */    00223000
  225. /*-----------------------------------------------------------------*/   00224000
  226. prep_print:                                                             00225000
  227.   'EXECIO 0 CP (STRING DEF 00E AS 02E'                                  00226000
  228.   'EXECIO 0 CP (STRING DEF PRT AS 00E'                                  00227000
  229.   'EXECIO 0 CP (STRING '||,                                             00228000
  230.                               'SPOOL 00E TO' userid() 'CONT CLASS A'    00229000
  231.   'ERASE NET_NEWS _OUTPUT_'                                             00230000
  232. return                                                                  00231000
  233. /*-----------------------------------------------------------------*/   00232000
  234. /* Check to see if we need to print.                              */    00233000
  235. /*-----------------------------------------------------------------*/   00234000
  236. Check_Print:                                                            00235000
  237.   cpline=''                                                             00236000
  238.   'EXECIO 0 CP (STRING CLOSE 00E NAME NET_NEWS _OUTPUT_'                00237000
  239.   'EXECIO 1 CP (VAR CPLINE STRING SPOOL 00E CLOSE'                      00238000
  240.   'EXECIO 0 CP (STRING DETACH 00E'                                      00239000
  241.   'EXECIO 0 CP (STRING DEF 02E AS 00E'                                  00240000
  242.   if cpline^='' then                                                    00241000
  243.     do                                                                  00242000
  244.       'EXECIO 0 CP (STRING ORDER RDR' word(cpline,3)                    00243000
  245.       if rc^=0 then                                                     00244000
  246.         do                                                              00245000
  247.           say 'Lost printed articles!'                                  00246000
  248.         end                                                             00247000
  249.       else                                                              00248000
  250.         do                                                              00249000
  251.           'DEPRINT NET_NEWS _OUTPUT_'                                   00250000
  252.           if rc=0 then                                                  00251000
  253.             do                                                          00252000
  254.               'EXEC DPRINT NET_NEWS _OUTPUT_ ( CC YES' /*$$$ print cmd*/00253000
  255.               'ERASE NET_NEWS _OUTPUT_'                                 00254000
  256.             end                                                         00255000
  257.           else                                                          00256000
  258.             do                                                          00257000
  259.               say 'Bad return DEPRINT('rc')! You must print the file',  00258000
  260.                   '"NET_NEWS _OUTPUT_"'                                 00259000
  261.               say 'manually. It should be in the RDR!'                  00260000
  262.               'ERASE NET_NEWS _OUTPUT_'                                 00261000
  263.             end                                                         00262000
  264.         end                                                             00263000
  265.     end                                                                 00264000
  266. return                                                                  00265000
  267. /*-----------------------------------------------------------------*/   00266000
  268. /* Display contract stuff to a new nnr user.                       */   00267000
  269. /*-----------------------------------------------------------------*/   00268000
  270. verbiage:                                                               00269000
  271. 'SET CMSTYPE HT'                                                        00270000
  272. 'STATE' servaddr 'NNReader A'                                           00271000
  273. src=rc                                                                  00272000
  274. 'SET CMSTYPE RT'                                                        00273000
  275. if src=0 then Return                                                    00274000
  276. say 'NNR version S_1.2.2e, Copyright (C) 1991,1992 Paul J. Campbell'    00275000
  277. say 'NNR comes with ABSOLUTELY NO WARRANTY; for details type           '00276000
  278. say '"TYPE MITRE LICENSE"                                            '  00277000
  279. say 'This is free software, and you are welcome to redistribute it     '00278000
  280. say 'under certain conditions; type "TYPE MITRE LICENSE".             ' 00279000
  281. return                                                                  00280000
  282. /*-----------------------------------------------------------------*/   00281000
  283. /* Display contract stuff to a new nnr user.                       */   00282000
  284. /*-----------------------------------------------------------------*/   00283000
  285. weekago:procedure                                                       00284000
  286. arg daysback                                                            00285000
  287. mmddyy=date('U')                                                        00286000
  288. parse var mmddyy month '/' day '/' year                                 00287000
  289. julian=date('J')                                                        00288000
  290. parse var julian 1 thisyear 3 thisday                                   00289000
  291. m.1=31                                                                  00290000
  292. /* at some point determine if leap year */                              00291000
  293. m.2=28                                                                  00292000
  294. m.3=31                                                                  00293000
  295. m.4=30                                                                  00294000
  296. m.5=31                                                                  00295000
  297. m.6=30                                                                  00296000
  298. m.7=31                                                                  00297000
  299. m.8=31                                                                  00298000
  300. m.9=30                                                                  00299000
  301. m.10=31                                                                 00300000
  302. m.11=30                                                                 00301000
  303. m.12=31                                                                 00302000
  304. newday=day*1                                                            00303000
  305. newmonth=month*1                                                        00304000
  306. newyear=year*1                                                          00305000
  307. if daysback>=365 then                                                   00306000
  308.   do                                                                    00307000
  309.     say 'We only go back 365 days!'                                     00308000
  310.     newyear=newyear-1                                                   00309000
  311.     year=right('00'||newyear,2)                                         00310000
  312.     return(year||month||day)                                            00311000
  313.   end                                                                   00312000
  314. if thisday>daysback then /* it is this year */                          00313000
  315.   do                                                                    00314000
  316.     daysback=thisday-daysback                                           00315000
  317.     month2days=0                                                        00316000
  318.     do i=1 to newmonth                                                  00317000
  319.       savem2d=month2days                                                00318000
  320.       month2days=month2days+m.i                                         00319000
  321.       if month2days>=daysback then                                      00320000
  322.         do                                                              00321000
  323.           if i>1 then                                                   00322000
  324.             do                                                          00323000
  325.               newmonth=i                                                00324000
  326.               daysback=daysback-savem2d                                 00325000
  327.               newday=max(1,min(m.newmonth,daysback))                    00326000
  328.               day=right('00'||newday,2)                                 00327000
  329.               month=right('00'||newmonth,2)                             00328000
  330.               return(year||month||day)                                  00329000
  331.             end                                                         00330000
  332.           else                                                          00331000
  333.             do                                                          00332000
  334.               newday=max(1,min(31,daysback))                            00333000
  335.               day=right('00'||newday,2)                                 00334000
  336.               return(year||'01'||day)                                   00335000
  337.             end                                                         00336000
  338.         end                                                             00337000
  339.     end                                                                 00338000
  340.   end                                                                   00339000
  341. else    /* we are talking last year */                                  00340000
  342.   do                                                                    00341000
  343.     newyear=newyear-1                                                   00342000
  344.     year=right('00'||newyear,2)                                         00343000
  345.     daysback=daysback-thisday                                           00344000
  346.     month2days=0                                                        00345000
  347.     do i=12 to newmonth by -1                                           00346000
  348.       month2days=month2days+m.i                                         00347000
  349.       if month2days>daysback then                                       00348000
  350.         do                                                              00349000
  351.           if i<12 then                                                  00350000
  352.             do                                                          00351000
  353.               newmonth=i                                                00352000
  354.               daysback=month2days-daysback                              00353000
  355.               newday=max(1,min(m.newmonth,daysback))                    00354000
  356.               day=right('00'||newday,2)                                 00355000
  357.               month=right('00'||newmonth,2)                             00356000
  358.               return(year||month||day)                                  00357000
  359.             end                                                         00358000
  360.           else                                                          00359000
  361.             do                                                          00360000
  362.               newday=max(1,min(31,31-daysback))                         00361000
  363.               day=right('00'||newday,2)                                 00362000
  364.               return(year||'12'||day)                                   00363000
  365.             end                                                         00364000
  366.         end                                                             00365000
  367.     end                                                                 00366000
  368.   end                                                                   00367000
  369.   say 'Flawed logic, daysback!'                                         00368000
  370. return(yymmdd)                                                          00369000
  371. /*-----------------------------------------------------------------*/   00370000
  372. /* rename "Groups Read" for hex(ipaddr) Read    *temporary*        */   00371000
  373. /*-----------------------------------------------------------------*/   00372000
  374. Groups2IP:procedure                                                     00373000
  375. arg servaddr                                                            00374000
  376.   'SET CMSTYPE HT'                                                      00375000
  377.   'RENAME Groups Read A' servaddr 'NNReader A'                          00376000
  378.   'SET CMSTYPE RT'                                                      00377000
  379. Return                                                                  00378000
  380. :READ  NNRLIST  $EXEC    D2 NNR130 05/09/92 14:21:13                            
  381. /**------------------------------------------------------------------**/00001000
  382. /** file - NNR LIST driver                                           **/00002000
  383. /**------------------------------------------------------------------**/00003000
  384. /*====================== NNRLIST  HISTORY ============================*/00004000
  385. /* 01/04/92 created                                                   */00005000
  386. /*          * add novalue routine for compile                         */00006000
  387. /*          * add multi-server support                                */00007000
  388. /* 03/31/92 1.2.2d - must be run with nnr 1.2.2d (with RXSSTAT)       */00008000
  389. /* 05/09/92 1.2.2e                                                    */00009000
  390. /*=========================== HISTORY ================================*/00010000
  391. /**                                                                     00011000
  392.     Copyright (C) 1991  Paul J. Campbell                                00012000
  393.                                                                         00013000
  394.     This program is free software; you can redistribute it and/or modify00014000
  395.     it under the terms of the MITRE Corporation General Public License a00015000
  396.     published by the MITRE Corporation                                  00016000
  397.                                                                         00017000
  398.     This program is distributed in the hope that it will be useful,     00018000
  399.     but WITHOUT ANY WARRANTY; without even the implied warranty of      00019000
  400.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the       00020000
  401.     MITRE General Public License for more details.                      00021000
  402.                                                                         00022000
  403.     You should have received a copy of the MITRE General Public License 00023000
  404.     along with this program; if not, write to the MITRE Corporation.    00024000
  405. **/                                                                     00025000
  406. signal on novalue                                                       00026000
  407. trace('N')                                                              00027000
  408. Address COMMAND                                                         00028000
  409. arg ipaddr                                                              00029000
  410. MODE='A'                                                                00030000
  411. 'GLOBALV SELECT VMNNTP'                                                 00031000
  412. 'GLOBALV SETL SOCKET'                                                   00032000
  413. 'GLOBALV SETL IPADDR 000.000.000.000'                                   00033000
  414. if ipaddr='' then                                                       00034000
  415.   'GLOBALV GET IPADDR'                                                  00035000
  416. nntprc=RXInital(IPADDR)                                                 00036000
  417. say nntprc                                                              00037000
  418. if word(nntprc,1)^='200' & word(nntprc,1)^='201' then                   00038000
  419.   do                                                                    00039000
  420.     say nntprc                                                          00040000
  421.     nntprc=NEWSQuit()                                                   00041000
  422.     nntprc=RXTermin()                                                   00042000
  423.     Exit(1)                                                             00043000
  424.   end                                                                   00044000
  425. list.=''                                                                00045000
  426. nntprc=TEXT_Response('LIST')                                            00046000
  427. If word(nntprc,1)^='-1' Then                                            00047000
  428.   if word(Check_Status(),1)^='215' then                                 00048000
  429.     do                                                                  00049000
  430.       say nntprc                                                        00050000
  431.       nntprc=NEWSQuit()                                                 00051000
  432.       nntprc=RXTermin()                                                 00052000
  433.       Exit(1)                                                           00053000
  434.     end                                                                 00054000
  435. Call Split_Response                                                     00055000
  436. i=0                                                                     00056000
  437. list.=''                                                                00057000
  438. do l=1 to item.0                                                        00058000
  439.   if index(word(item.l,4),'=')=0 then                                   00059000
  440.     do                                                                  00060000
  441.       i=i+1                                                             00061000
  442.       list.i=item.l                                                     00062000
  443.     end                                                                 00063000
  444. end                                                                     00064000
  445. list.0=i                                                                00065000
  446. Call SortList                                                           00066000
  447. do i=1 to list.0                                                        00067000
  448.   status=STATUS_Response('GROUP' word(list.i,1))                        00068000
  449.   list.i=word(list.i,1) word(status,4) word(status,3) word(list.i,4)    00069000
  450. end                                                                     00070000
  451. nntprc=NEWSQuit()                                                       00071000
  452. nntprc=RXTermin()                                                       00072000
  453. 'EXECIO * DISKW NNTP TEMP' mode '0 V 80 (FINIS STEM LIST.'              00073000
  454. parse var ipaddr oct1 '.' oct2 '.' oct3 '.' oct4                        00074000
  455. servaddr=right('0'||d2x(oct1),2)||,                                     00075000
  456.           right('0'||d2x(oct2),2)||,                                    00076000
  457.           right('0'||d2x(oct3),2)||,                                    00077000
  458.           right('0'||d2x(oct4),2)                                       00078000
  459. /* next 2 statements for migration from old method to multi-server */   00079000
  460. 'RENAME NNTP GROUPS' mode servaddr 'GROUPS' mode                        00080000
  461. 'RENAME NNTP OLDGROUPS' mode servaddr 'OLDGROUP' mode                   00081000
  462. /**/                                                                    00082000
  463. 'ERASE' servaddr 'OLDGROUP' mode                                        00083000
  464. 'RENAME' servaddr 'GROUPS' mode servaddr 'OLDGROUP' mode                00084000
  465. 'RENAME NNTP TEMP' mode servaddr 'GROUPS' mode                          00085000
  466. Exit(0)                                                                 00086000
  467. /*-----------------------------------------------------------------*/   00087000
  468. /* Routine Handle signal novalue                                   */   00088000
  469. /*-----------------------------------------------------------------*/   00089000
  470. NOVALUE:                                                                00090000
  471. parse source . . myname .                                               00091000
  472. say "NOVALUE error in" myname "line" sigl":"                            00092000
  473. say "Source line>" sourceline(sigl)                                     00093000
  474. exit(999)                                                               00094000
  475. /*-----------------------------------------------------------------*/   00095000
  476. /* Routine to sort list                                            */   00096000
  477. /* Standard "Shell Sort" (textbook version)                        */   00097000
  478. /*-----------------------------------------------------------------*/   00098000
  479. SortList:                                                               00099000
  480.    Procedure Expose List.                                               00100000
  481.    Gap = 1                                                              00101000
  482.    Length = List.0                                                      00102000
  483.    Do While ( Gap < Length )                                            00103000
  484.       Gap = Gap * 2                                                     00104000
  485.       End                                                               00105000
  486.    Do While ( Gap > 1 )                                                 00106000
  487.       Gap = Gap % 2                                                     00107000
  488.       Limit = Length - Gap                                              00108000
  489.       Do Scan = 1 To Limit                                              00109000
  490.          NextHigher= Scan + Gap                                         00110000
  491.          If Substr(List.Scan,1,25) > substr(List.NextHigher,1,25) Then  00111000
  492.            Do                                                           00112000
  493.             Temp = List.NextHigher                                      00113000
  494.             List.NextHigher = List.Scan                                 00114000
  495.             Do Bubble = Scan-Gap To 1 By -Gap ,                         00115000
  496.                While (Substr(Temp,1,25)<Substr(List.Bubble,1,25))       00116000
  497.                NextHigher= Bubble + Gap                                 00117000
  498.                List.NextHigher = List.Bubble                            00118000
  499.                End                                                      00119000
  500.             Bubble = Bubble + Gap                                       00120000
  501.             List.Bubble = Temp                                          00121000
  502.            End                                                          00122000
  503.          End                                                            00123000
  504.       End                                                               00124000
  505.    Return                                                               00125000
  506. /**********************************************************************/00126000
  507. /*   Initialize RXSOCKET                                              */00127000
  508. /**********************************************************************/00128000
  509. RXInital:Procedure expose socket                                        00129000
  510. parse arg args                                                          00130000
  511.   if Socket('Initialize', 'NNTPConn') = '-1' Then                       00131000
  512.     Return('-1 INITIALIZE '||errno)                                     00132000
  513.   socket  = Socket('Socket', 'AF_INET', 'Sock_Stream')                  00133000
  514.   If socket="-1" Then                                                   00134000
  515.     Return('-1 SOCKET '||errno)                                         00135000
  516.   'GLOBALV SETL SOCKET' socket                                          00136000
  517.   name = AF_INET||Htons(119)||Inet_Addr(word(args,1))                   00137000
  518.   rc = Socket('Connect', socket, name)                                  00138000
  519.   If rc="-1" Then                                                       00139000
  520.     Return('-1 CONNECT '||errno)                                        00140000
  521.   status=STATUS_Response('')                                            00141000
  522. Return(status)                                                          00142000
  523. /**********************************************************************/00143000
  524. /*   Terminate NEWS Session                                           */00144000
  525. /**********************************************************************/00145000
  526. RXTermin:Procedure expose socket                                        00146000
  527.   If Socket('Close', socket) = '-1' Then                                00147000
  528.     Say 'CLOSE '||errno                                                 00148000
  529.   If Socket('Terminate', 'NNTPConn') = '-1' Then                        00149000
  530.     Return('-1 TERMINATE '||errno)                                      00150000
  531. Return(0)                                                               00151000
  532. /**********************************************************************/00152000
  533. /*   QUIT the server                                                  */00153000
  534. /**********************************************************************/00154000
  535. NEWSQuit:Procedure expose socket                                        00155000
  536.   status=STATUS_Response('QUIT')                                        00156000
  537.   if word(Status,1)='205' then                                          00157000
  538.     Status=0                                                            00158000
  539. Return(Status)                                                          00159000
  540. /**********************************************************************/00160000
  541. /*   Check Status Response (ends with cr lf)                          */00161000
  542. /**********************************************************************/00162000
  543. STATUS_Response: procedure expose socket line                           00163000
  544. parse arg command                                                       00164000
  545.   status=0                                                              00165000
  546.   if command ^='' then                                                  00166000
  547.     status=NEWS_Command(command)                                        00167000
  548.   If word(Status,1)^='-1' Then                                          00168000
  549.     do                                                                  00169000
  550.       line = ""                                                         00170000
  551.       pattern='0D0A'x                                                   00171000
  552.       Do Forever                                                        00172000
  553.         bytes_in = Socket('Read', socket, 'data')                       00173000
  554.         If bytes_in="-1" Then Return('-1 READ '||errno)                 00174000
  555.         line = line || data                                             00175000
  556.         If bytes_in=0 | index(data,pattern)>0 then                      00176000
  557.         Leave                                                           00177000
  558.       End                                                               00178000
  559.       Parse Var line data '0D0A'x .                                     00179000
  560.       Status=A2E(data)                                                  00180000
  561.     End                                                                 00181000
  562. Return(status)                                                          00182000
  563. /**********************************************************************/00183000
  564. /*   Check TEXT Response (ends with a .)                              */00184000
  565. /**********************************************************************/00185000
  566. TEXT_Response: procedure expose socket line                             00186000
  567. parse arg command                                                       00187000
  568.   status=NEWS_Command(command)                                          00188000
  569.   If word(Status,1)^='-1' Then                                          00189000
  570.     do                                                                  00190000
  571.       status=0                                                          00191000
  572.       line = ""                                                         00192000
  573.       pattern='0D0A'x||E2A('.')||'0D0A'x                                00193000
  574.       Do Forever                                                        00194000
  575.         bytes_in = Socket('Read', socket, 'data')                       00195000
  576.         If bytes_in="-1" Then Return('-1 READ '||errno)                 00196000
  577.         line = line || data                                             00197000
  578.         test=substr(line,length(line)-4)                                00198000
  579.         If bytes_in=0 | index(test,pattern)>0 then                      00199000
  580.         Leave                                                           00200000
  581.       End                                                               00201000
  582.     End                                                                 00202000
  583. Return(status)                                                          00203000
  584. /**********************************************************************/00204000
  585. NEWS_Command:Procedure expose socket                                    00205000
  586. parse arg command                                                       00206000
  587.   data = E2A(command) || '0D0A'x                                        00207000
  588.   bytes_out = Socket('Write', socket, data)                             00208000
  589.   If bytes_out="-1" Then Return('-1 WRITE '||errno)                     00209000
  590. Return(0)                                                               00210000
  591. /**********************************************************************/00211000
  592. /*   Check Status                                                     */00212000
  593. /**********************************************************************/00213000
  594. Check_Status:Procedure expose line                                      00214000
  595.   Parse Var line data '0D0A'x line                                      00215000
  596. Return(A2E(data))                                                       00216000
  597. /**********************************************************************/00217000
  598. /*   Split Response Buffer                                            */00218000
  599. /**********************************************************************/00219000
  600. Split_Response:Procedure expose line item.                              00220000
  601.   item.=''                                                              00221000
  602.   i=0                                                                   00222000
  603.   Do Forever                                                            00223000
  604.     If line="" Then Leave                                               00224000
  605.     Parse Var line data '0D0A'x line                                    00225000
  606.     i=i+1                                                               00226000
  607.     item.i=A2E(data)                                                    00227000
  608.   End                                                                   00228000
  609.   item.i=''                                                             00229000
  610.   item.0=i-1                                                            00230000
  611. Return                                                                  00231000
  612. /**********************************************************************/00232000
  613. /* A2E EXEC simple ascii to ebcdic translate by JCA                   */00233000
  614. /**********************************************************************/00234000
  615. A2E:                                                                    00235000
  616.    return translate(arg(1), ,                                           00236000
  617.      '00010203372D2E2F1605250B0C0D0E0F'x||,                             00237000
  618.      '101112133C3D322618193F271C1D1E1F'x||,                             00238000
  619.      '405A7F7B5B6C507D4D5D5C4E6B604B61'x||,                             00239000
  620.      'F0F1F2F3F4F5F6F7F8F97A5E4C7E6E6F'x||,                             00240000
  621.      '7CC1C2C3C4C5C6C7C8C9D1D2D3D4D5D6'x||,                             00241000
  622.      'D7D8D9E2E3E4E5E6E7E8E9ADE0BD716D'x||,                             00242000
  623.      '79818283848586878889919293949596'x||,                             00243000
  624.      '979899A2A3A4A5A6A7A8A9C04FD05F07'x||,                             00244000
  625.      '00010203372D2E2F1605250B0C0D0E0F'x||,                             00245000
  626.      '101112133C3D322618193F271C1D1E1F'x||,                             00246000
  627.      '405A7F7B5B6C507D4D5D5C4E6B604B61'x||,                             00247000
  628.      'F0F1F2F3F4F5F6F7F8F97A5E4C7E6E6F'x||,                             00248000
  629.      '7CC1C2C3C4C5C6C7C8C9D1D2D3D4D5D6'x||,                             00249000
  630.      'D7D8D9E2E3E4E5E6E7E8E9ADE0BD716D'x||,                             00250000
  631.      '79818283848586878889919293949596'x||,                             00251000
  632.      '979899A2A3A4A5A6A7A8A98B4F9B5F07'x)                               00252000
  633. /**********************************************************************/00253000
  634. /* E2A EXEC simple ebcdic to ascii translate by JCA                   */00254000
  635. /**********************************************************************/00255000
  636. E2A:                                                                    00256000
  637.    return translate(arg(1), ,                                           00257000
  638.      '000102030009007F0000000B0C0D0E0F'x||,                             00258000
  639.      '1011121300000800181900001C1D1E1F'x||,                             00259000
  640.      '00000000000A171B0000000000050607'x||,                             00260000
  641.      '0000160000000004000000001415001A'x||,                             00261000
  642.      '20000000000000000000002E3C282B7C'x||,                             00262000
  643.      '2600000000000000000021242A293B7E'x||,                             00263000
  644.      '2D2F0000000000000000002C255F3E3F'x||,                             00264000
  645.      '005E00000000000000603A2340273D22'x||,                             00265000
  646.      '00616263646566676869007B00000000'x||,                             00266000
  647.      '006A6B6C6D6E6F707172007D00000000'x||,                             00267000
  648.      '007E737475767778797A0000005B0000'x||,                             00268000
  649.      '000000000000000000000000005D0000'x||,                             00269000
  650.      '7B414243444546474849000000000000'x||,                             00270000
  651.      '7D4A4B4C4D4E4F505152000000000000'x||,                             00271000
  652.      '5C00535455565758595A000000000000'x||,                             00272000
  653.      '30313233343536373839000000000000'x)                               00273000
  654. :READ  NNR$ARTI $XEDIT   D2 NNR130 05/09/92 14:12:34                            
  655. /**------------------------------------------------------------------**/00001000
  656. /** Network News Reader                                              **/00002000
  657. /** file - nnr$arti xedit                                            **/00003000
  658. /**                                                   Article        **/00004000
  659. /**------------------------------------------------------------------**/00005000
  660. /*====================== NNR$ARTI HISTORY ============================*/00006000
  661. /* 08/21/91 M_1.2.0                                                   */00007000
  662. /* 09/09/91 increased input line to 255                               */00008000
  663. /* 09/10/91 add rot13                            JEFF@MITVMA.MIT.EDU  */00009000
  664. /* 08/21/91 M_1.2.1                                                   */00010000
  665. /* 10/10/91 Replace MAIL and POST screens                             */00011000
  666. /* 10/10/91 M_1.2.2                                                   */00012000
  667. /* 11/12/91 fix posting                                               */00013000
  668. /* 11/29/91 M_1.2.2a                                                  */00014000
  669. /* 12/08/91 add next group function (previous group PG from cmd line) */00015000
  670. /* 12/21/91 limit number of line per article                          */00016000
  671. /* 12/21/91 fix a few things                                          */00017000
  672. /* 12/21/91 *_1.2.2b                                                  */00018000
  673. /*          * fix from GILMART@lstc2vm.stortek.com                    */00019000
  674. /* 01/28/92 *_1.2.2c                                                  */00020000
  675. /*          * fix from GILMART@lstc2vm.stortek.com (mail/post '.')    */00021000
  676. /*          * eliminate SAVE command                                  */00022000
  677. /*          * add counter article screen                              */00023000
  678. /*          * add novalue routines (for compile)                      */00024000
  679. /* 03/31/92 *_1.2.2d                                                  */00025000
  680. /*          * add edit mode s                                         */00026000
  681. /* 05/09/92 *_1.2.2e                                                  */00027000
  682. /*=========================== HISTORY ================================*/00028000
  683. /**                                                                     00029000
  684.     Copyright (C) 1991  Paul J. Campbell                                00030000
  685.                                                                         00031000
  686.     This program is free software; you can redistribute it and/or modify00032000
  687.     it under the terms of the MITRE Corporation General Public License a00033000
  688.     published by the MITRE Corporation                                  00034000
  689.                                                                         00035000
  690.     This program is distributed in the hope that it will be useful,     00036000
  691.     but WITHOUT ANY WARRANTY; without even the implied warranty of      00037000
  692.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the       00038000
  693.     MITRE General Public License for more details.                      00039000
  694.                                                                         00040000
  695.     You should have received a copy of the MITRE General Public License 00041000
  696.     along with this program; if not, write to the MITRE Corporation.    00042000
  697.                                                                         00043000
  698. **/                                                                     00044000
  699. trace('N')                                                              00045000
  700. signal on novalue                                                       00046000
  701. Address xedit                                                           00047000
  702. 'Set ctlchar' '29'x 'escape'                                            00048000
  703. 'Set ctlchar @ protect red high'                                        00049000
  704. 'Set ctlchar' '4a'x 'protect yellow high'                               00050000
  705. 'Set ctlchar ! protect blue nohigh'                                     00051000
  706. 'Set ctlchar $ noprotect turq high'                                     00052000
  707. 'Set ctlchar * noprotect white nohigh'                                  00053000
  708. 'Set ctlchar & protect pink nohigh'                                     00054000
  709. 'Set ctlchar ^ protect green nohigh'                                    00055000
  710. 'Extract /lscreen'                                                      00056000
  711. 'Set msgline on' lscreen.1-3 2 'overlay'                                00057000
  712. 'Set CMDline BOTTOM'                                                    00058000
  713. 'SET LRECL *'                                                           00059000
  714. 'SET VERIFY 1 *'                                                        00060000
  715. 'SET TRUNC *'                                                           00061000
  716. 'SET ZONE 1 *'                                                          00062000
  717. 'SET RECFM V'                                                           00063000
  718. 'SET SPILL WORD'                                                        00064000
  719. 'SET CURLINE ON 3'                                                      00065000
  720. 'SET PREFIX OFF'                                                        00066000
  721. 'SET SCALE OFF'                                                         00067000
  722. 'SET LINEND OFF'                                                        00068000
  723. 'SET TABS 1 9 17 25 33 41 49 57 65 73 81 89 97 105 113 121 129 137 145' 00069000
  724. 'SET IMAGE ON'                                                          00070000
  725. 'SET PF04 ONLY dummy'                                                   00071000
  726. 'SET PF16 ONLY dummy'                                                   00072000
  727. Address COMMAND 'GLOBALV SELECT VMNNTP'                                 00073000
  728. Address COMMAND 'GLOBALV GET VERSION'                                   00074000
  729. Address COMMAND 'GLOBALV GET HEADERS'                                   00075000
  730. Address COMMAND 'GLOBALV GET LINES'                                     00076000
  731. Address COMMAND 'GLOBALV GET SUBJECT'                                   00077000
  732. /*-----------------------------------------------------------------*/   00078000
  733. /* Driver routine for the main menu screen.                        */   00079000
  734. /*-----------------------------------------------------------------*/   00080000
  735. ROTin  = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; /*MIT*/00081000
  736. ROTout = 'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'; /*MIT*/00082000
  737. message = '';                                                           00083000
  738. item.=''                                                                00084000
  739. if queued()>0 then parse pull group                                     00085000
  740. i=0                                                                     00086000
  741. item.0=queued()-1                                                       00087000
  742. do while (queued()>1)                                                   00088000
  743.   i=i+1                                                                 00089000
  744.   parse pull item.i                                                     00090000
  745.   if left(item.i,1)='.' then                                            00091000
  746.     item.i=substr(item.i,2)                                             00092000
  747.   'INPUT' item.i                                                        00093000
  748.   'Extract /curline'                                                    00094000
  749.   item.i = curline.3                                                    00095000
  750. end                                                                     00096000
  751. parse pull junk                                                         00097000
  752. if item.0>=lines then                                                   00098000
  753.   Message='Too many lines in article, exceeds limit of' lines           00099000
  754. scrbot=lscreen.1-4                                                      00100000
  755. index=0                                                                 00101000
  756. row=3;col=2;                                                            00102000
  757. flag = 'true';                                                          00103000
  758. 'TOP'                                                                   00104000
  759. Address COMMAND 'DESBUF'                                                00105000
  760. Do Forever;                                                             00106000
  761.   Call Mainscreen                   /* display main menu screen    */   00107000
  762.   'Read Nochange Tag'                                                   00108000
  763.   'Extract /cursor'                                                     00109000
  764.   row = cursor.1; col = cursor.2;                                       00110000
  765.   Do Queued();                      /* loop for each field changed */   00111000
  766.     Parse Pull key line column string;    /* read reply info       */   00112000
  767.     Select;                                                             00113000
  768.       When key = "CMD" Then Call CommandLine                            00114000
  769.       When key = "ETK" Then Call EnterKey                               00115000
  770.       When key = "PFK" Then Call PFKeys                                 00116000
  771.       otherwise Nop                                                     00117000
  772.     End                                                                 00118000
  773.   End                                                                   00119000
  774.   if flag^='true' then                                                  00120000
  775.     do                                                                  00121000
  776.        Address COMMAND 'DESBUF'                                         00122000
  777.        push flag                                                        00123000
  778.       'QQUIT'                                                           00124000
  779.       Exit                                                              00125000
  780.     End                                                                 00126000
  781. End                                                                     00127000
  782. /*-----------------------------------------------------------------*/   00128000
  783. /* Routine Handle signal novalue                                   */   00129000
  784. /*-----------------------------------------------------------------*/   00130000
  785. NOVALUE:                                                                00131000
  786. parse source . . myname .                                               00132000
  787. say "NOVALUE error in" myname "line" sigl":"                            00133000
  788. say "Source line>" sourceline(sigl)                                     00134000
  789. Call WhichGroup('QUIT')                                                 00135000
  790. Address COMMAND 'DESBUF'                                                00136000
  791. push 'QUIT'                                                             00137000
  792. 'QQUIT'                                                                 00138000
  793. exit(999)                                                               00139000
  794. /*-----------------------------------------------------------------*/   00140000
  795. /* Routine to display the main menu screen.                        */   00141000
  796. /*-----------------------------------------------------------------*/   00142000
  797. Mainscreen:                         /* set each line of the screen */   00143000
  798.    'Set Reserved 1 noh' '29'x'@               ',                        00144000
  799.                   center('*** NNR/VM ('||version||') ***',35),          00145000
  800.                   right('Article',25),                                  00146000
  801.                   '29'x'!                    '                          00147000
  802.    'Set Reserved 2 noh' '29'x'@'||'#'||left(subject,78)||'29'x'!'       00148000
  803.    'Extract /flscreen'                                                  00149000
  804.    'Set Reserved 3 noh' '29'x'@'||group||,                              00150000
  805.                    ' (Lines='||flscreen.1||'/'||item.0||')'||'29'x'!'   00151000
  806.    'Set Reserved' lscreen.1-3 'Noh'                                     00152000
  807.    'Set Reserved' lscreen.1-2 'high',                                   00153000
  808.                                  ' 1= Help     ',                       00154000
  809.                                ||'2= Next     ',                        00155000
  810.                                ||'3= Quit     ',                        00156000
  811.                                ||' 4= Previous ',                       00157000
  812.                                ||' 5= PostMail ',                       00158000
  813.                                ||' 6= HeadBody'                         00159000
  814.    'Set Reserved' lscreen.1-1 'high',                                   00160000
  815.                                  ' 7= Backward ',                       00161000
  816.                                ||'8= Forward  ',                        00162000
  817.                                ||'9= Print    ',                        00163000
  818.                                ||'10= Rot13    ',      /* MIT */        00164000
  819.                                ||'11= Log      ',                       00165000
  820.                                ||'12= NxtGroup'                         00166000
  821.    If message ^= "" Then                                                00167000
  822.       Do;                                                               00168000
  823.          'EMSG' message                                                 00169000
  824.          message = '';                                                  00170000
  825.       End;                                                              00171000
  826.    'Cursor cmdline'                                                     00172000
  827. Return;                                                                 00173000
  828. /*-----------------------------------------------------------------*/   00174000
  829. /* Routine to pick off the ENTER Key.                              */   00175000
  830. /*-----------------------------------------------------------------*/   00176000
  831. EnterKey:                                                               00177000
  832.    row=lscreen.1; col=7                                                 00178000
  833. Return                                                                  00179000
  834. /*-----------------------------------------------------------------*/   00180000
  835. /* Routine to pick off the command line.                           */   00181000
  836. /*-----------------------------------------------------------------*/   00182000
  837. CommandLine:                                                            00183000
  838.    XeditCommand=strip(line||' '||column||' '||string);                  00184000
  839.    If Abbrev('INPUT',translate(line),1) then                            00185000
  840.      Message='INPUT command is not currently supported!'                00186000
  841.    Else If Abbrev('XEDIT',translate(line),1) then                       00187000
  842.      Message='XEDIT command is not currently supported!'                00188000
  843.    Else If Abbrev('MACRO',translate(line),2) then                       00189000
  844.      Message='MACRO command is not currently supported!'                00190000
  845.    Else If (Abbrev('QQUIT',translate(line),2) |,                        00191000
  846.       translate(XeditCommand) = 'QUIT') Then                            00192000
  847.      Call WhichGroup('QUIT')                                            00193000
  848.    Else If Abbrev('NGROUP',translate(line),2) Then                      00194000
  849.      Call WhichGroup('NEXT')                                            00195000
  850.    Else If Abbrev('PGROUP',translate(line),2) Then                      00196000
  851.      Call WhichGroup('PREV')                                            00197000
  852.    Else If (translate(line) = 'LOG') Then                               00198000
  853.      Call Log                                                           00199000
  854.    Else                                                                 00200000
  855.      XeditCommand                                                       00201000
  856. Return                                                                  00202000
  857. /*-----------------------------------------------------------------*/   00203000
  858. /* Routine to handle the PFKs key.                                 */   00204000
  859. /*-----------------------------------------------------------------*/   00205000
  860. PFKeys:                                                                 00206000
  861.    XeditCommand=''                                                      00207000
  862.    Call PFKmap                                                          00208000
  863.    If Line=1 then Call NNR$HELP                                         00209000
  864.    else If Line=2 then flag='NEXT'                                      00210000
  865.    else If Line=3 then Call WhichGroup('QUIT')                          00211000
  866.    else If Line=4 then flag='LAST'                                      00212000
  867.    else If Line=5 then Call PostMail                                    00213000
  868.    else If Line=6 then flag='HEADBODY'                                  00214000
  869.    else If Line=7 then 'BACKWARD'                                       00215000
  870.    else If Line=8 then 'FORWARD'                                        00216000
  871.    else If Line=9 then Call Print                                       00217000
  872.    else If Line=10 then Call Rot13     /* MIT */                        00218000
  873.    else If Line=11 then Call Log                                        00219000
  874.    else If Line=12 then Call WhichGroup('NEXT')                         00220000
  875.    else message='Unsupported PFK'                                       00221000
  876. Return                                                                  00222000
  877. /*-----------------------------------------------------------------*/   00223000
  878. /* Routine to handle PFK Mapping.                                  */   00224000
  879. /*-----------------------------------------------------------------*/   00225000
  880. PFKmap:                                                                 00226000
  881.   if line>12 then line=line-12                                          00227000
  882. Return                                                                  00228000
  883. /*-----------------------------------------------------------------*/   00229000
  884. /* Routine to pick off the ENTER Key.                              */   00230000
  885. /*-----------------------------------------------------------------*/   00231000
  886. WhichGroup:                                                             00232000
  887.   arg which                                                             00233000
  888.   flag='QUIT'                                                           00234000
  889.   Address COMMAND 'GLOBALV SETL MOREGROUPS' which                       00235000
  890. Return                                                                  00236000
  891. /*-----------------------------------------------------------------*/   00237000
  892. /* Routine to handle PFK Posting.                                  */   00238000
  893. /*-----------------------------------------------------------------*/   00239000
  894. PostMail:                                                               00240000
  895.   Address COMMAND 'GLOBALV SETL NEWSGROUP' group                        00241000
  896.   If Headers='BODY' Then                                                00242000
  897.     Address COMMAND 'EXECIO' item.0 'DISKW N$N$T$P$ P$O$S$T$ A',        00243000
  898.         '0 V 150 ( FINIS STEM ITEM.'                                    00244000
  899.   else                                                                  00245000
  900.     do                                                                  00246000
  901.       i = 1                                                             00247000
  902.       Do while words(item.i) ^= 0         /* find first blank line */   00248000
  903.         i = i + 1                                                       00249000
  904.       End                                                               00250000
  905.       Do j=i to item.0                                                  00251000
  906.         Address COMMAND 'EXECIO 1 DISKW N$N$T$P$ P$O$S$T$ A',           00252000
  907.          '0 V 150 ( STRING' item.j                                      00253000
  908.       End                                                               00254000
  909.       Address COMMAND 'FINIS N$N$T$P$ P$O$S$T$ A'                       00255000
  910.     End                                                                 00256000
  911.   flag='POST'                                                           00257000
  912. Return                                                                  00258000
  913. /*-----------------------------------------------------------------*/   00259000
  914. /* Routine to handle PFK Log.                                      */   00260000
  915. /*-----------------------------------------------------------------*/   00261000
  916. Log:                                                                    00262000
  917.   if words(XeditCommand)>1 then                                         00263000
  918.     notebook=translate(word(XeditCommand,2))                            00264000
  919.   else                                                                  00265000
  920.     notebook='NNRLOG'                                                   00266000
  921.   Address COMMAND 'DESBUF'                                              00267000
  922.   Address COMMAND 'EXECIO 1 DISKW' notebook 'NOTEBOOK A 0 V 132',       00268000
  923.                                           '(STRING' copies('=',72)      00269000
  924.   Address COMMAND 'EXECIO' item.0 'DISKW' notebook 'NOTEBOOK A 0 V 132',00270000
  925.                       '( FINIS STEM ITEM.'                              00271000
  926.    message='Article has been logged in' notebook 'notebook!'            00272000
  927. Return                                                                  00273000
  928. /*-----------------------------------------------------------------*/   00274000
  929. /* Routine to handle PFK Print.                                    */   00275000
  930. /*-----------------------------------------------------------------*/   00276000
  931. Print:                                                                  00277000
  932.   article_line_count=0                                                  00278000
  933.   do forever                                                            00279000
  934.     Address COMMAND 'EXECIO 1 PRINT (CC DATA STRING 1'||,               00280000
  935.                           group||' #'||word(subject,1)                  00281000
  936.     do linecount=1 to 55                                                00282000
  937.       article_line_count=article_line_count+1                           00283000
  938.       Address COMMAND 'EXECIO 1 PRINT (CC DATA STRING  '||,             00284000
  939.           left(item.article_line_count,132)                             00285000
  940.       if article_line_count=item.0 then                                 00286000
  941.         do                                                              00287000
  942.           message='Article has been appended to printer spool!'         00288000
  943.           Address COMMAND 'GLOBALV SET PRINT 1'                         00289000
  944.           Return                                                        00290000
  945.         end                                                             00291000
  946.     end                                                                 00292000
  947.   end                                                                   00293000
  948. Return                                                                  00294000
  949. /*-----------------------------------------------------------------*/   00295000
  950. /* Routine to handle PFK Rot13            /* MIT */                */   00296000
  951. /*-----------------------------------------------------------------*/   00297000
  952. Rot13:                                                                  00298000
  953.    'TOP'                                                                00299000
  954.    'NEXT'                                                               00300000
  955.    i = 1                                                                00301000
  956.   If Headers^='BODY' Then                                               00302000
  957.     Do while words(item.i) ^= 0         /* find first blank line */     00303000
  958.       i = i + 1                                                         00304000
  959.     End                                                                 00305000
  960.    'LOCATE :'i                                                          00306000
  961.    Do i = i to item.0                                                   00307000
  962.      if words(item.i) ^= 0 then do                                      00308000
  963.           item.i = translate(item.i,ROTout,ROTin)                       00309000
  964.           'OVERLAY' item.i                                              00310000
  965.      end                                                                00311000
  966.      'NEXT'                                                             00312000
  967.    End                                                                  00313000
  968.    'TOP'                                                                00314000
  969. Return                                                                  00315000
  970. NNR$HELP: Procedure                                                     00316000
  971. /**---------------------------------------------------------------**/   00317000
  972. /** Network News Reader                                           **/   00318000
  973. /**                                                       Help    **/   00319000
  974. /**---------------------------------------------------------------**/   00320000
  975. 'Extract /lscreen'                                                      00321000
  976. 'Set msgline on' lscreen.1-3 '2 overlay'                                00322000
  977. Address COMMAND 'GLOBALV SELECT VMNNTP'                                 00323000
  978. Address COMMAND 'GLOBALV GET VERSION'                                   00324000
  979. 'SET PF04 ONLY dummy'                                                   00325000
  980. 'SET PF16 ONLY dummy'                                                   00326000
  981. message = '';                                                           00327000
  982. start=5*18+1                                                            00328000
  983. scrheader='** Article Screen'                                           00329000
  984. helpscr.=''                                                             00330000
  985. Address COMMAND 'EXECIO 18 DISKR NNRHELP $XSCREEN *',                   00331000
  986.  start '(FINI STEM HELPSCR.'                                            00332000
  987. Address COMMAND 'DESBUF'                                                00333000
  988. Do Forever;                                                             00334000
  989.   Call HELPscreen;                  /* display main menu screen    */   00335000
  990.   'Read Nochange Tag'                                                   00336000
  991.   'Extract /cursor'                                                     00337000
  992.   row = cursor.5; col = cursor.6;                                       00338000
  993.   num=0                                                                 00339000
  994.   Do While(Queued()>0)                                                  00340000
  995.     num=num+1                                                           00341000
  996.     Parse Pull QueuedLine.num                                           00342000
  997.   end                                                                   00343000
  998.   do i=1 to num                                                         00344000
  999.     Parse var QueuedLine.i key line column string;                      00345000
  1000.     if key = "RES" Then Nop                                             00346000
  1001.     else SaveQueued=QueuedLine.i                                        00347000
  1002.   end                                                                   00348000
  1003.   Parse Var SaveQueued key line column string;                          00349000
  1004.   Select                                                                00350000
  1005.     When key = "CMD" Then Nop                                           00351000
  1006.     When key = "PFK" Then                                               00352000
  1007.       do                                                                00353000
  1008.         If Line=1 then Address COMMAND 'HELP CMS NNR'                   00354000
  1009.         else If Line=3 then                                             00355000
  1010.           do                                                            00356000
  1011.             Do i = 3 to 20                                              00357000
  1012.               'Set Reserved' i 'off'                                    00358000
  1013.             End                                                         00359000
  1014.             Return                                                      00360000
  1015.           End                                                           00361000
  1016.         else message='Unsupported PFK'                                  00362000
  1017.       end                                                               00363000
  1018.     When key = "ETK" Then Nop;                                          00364000
  1019.     otherwise Nop                                                       00365000
  1020.   End                                                                   00366000
  1021. End   /* Do Forever */                                                  00367000
  1022. Return                                                                  00368000
  1023.                                                                         00369000
  1024. /*-----------------------------------------------------------------*/   00370000
  1025. /* Routine to display the main menu screen.                        */   00371000
  1026. /*-----------------------------------------------------------------*/   00372000
  1027. HELPscreen:                         /* set each line of the screen */   00373000
  1028.    'Set Reserved 1 noh' '29'x'!             ' '29'x'@',                 00374000
  1029.                   center('*** NNR/VM ('||version||') ***',35),          00375000
  1030.                   right('Help',25),                                     00376000
  1031.                   '29'x'!                    '                          00377000
  1032.    'Set Reserved 2 noh' '29'x'@'||scrheader||'29'x'!'                   00378000
  1033.    Do i = 3 to 20                                                       00379000
  1034.      j=i-2                                                              00380000
  1035.      'Set Reserved' i 'noh' '29'x'!'Left(helpscr.j,78)'29'x'! '         00381000
  1036.    End;                                                                 00382000
  1037.    Do i = 21 to lscreen.1-4;                                            00383000
  1038.      'Set Reserved' i 'noh'                                             00384000
  1039.    End;                                                                 00385000
  1040.    'Set Reserved' lscreen.1-3 'Noh'                                     00386000
  1041.    'Set Reserved' lscreen.1-2 'high',                                   00387000
  1042.                                  ' 1= NNR_Help ',                       00388000
  1043.                                ||'2=          ',                        00389000
  1044.                                ||'3= Quit     ',                        00390000
  1045.                                ||' 4=          ',                       00391000
  1046.                                ||' 5=          ',                       00392000
  1047.                                ||' 6=         '                         00393000
  1048.    'Set Reserved' lscreen.1-1 'high',                                   00394000
  1049.                                  ' 7=          ',                       00395000
  1050.                                ||'8=          ',                        00396000
  1051.                                ||'9=          ',                        00397000
  1052.                                ||'10=          ',                       00398000
  1053.                                ||'11=          ',                       00399000
  1054.                                ||'12=         '                         00400000
  1055.    If message ^= "" Then                                                00401000
  1056.       Do                                                                00402000
  1057.          'EMSG' message                                                 00403000
  1058.          message = ''                                                   00404000
  1059.       End;                                                              00405000
  1060.    'Cursor screen' 15 4                                                 00406000
  1061. Return                                                                  00407000
  1062. :READ  NNR$NOTE $XEDIT   D2 NNR130 05/09/92 14:11:47                            
  1063. /**---------------------------------------------------------------**/   00001000
  1064. /** Network News Reader                                           **/   00002000
  1065. /** file - nnr$note xedit                                         **/   00003000
  1066. /**---------------------------------------------------------------**/   00004000
  1067. /*====================== NNR$NOTE HISTORY ============================*/00005000
  1068. /* 08/21/91 M_1.2.0                                                   */00006000
  1069. /* 08/21/91 M_1.2.1                                                   */00007000
  1070. /* 10/10/91 Replace MAIL and POST screens                             */00008000
  1071. /* 10/10/91 M_1.2.2                                                   */00009000
  1072. /* 11/12/91 fix posting                                               */00010000
  1073. /* 11/29/91 M_1.2.2a                                                  */00011000
  1074. /* 12/10/91 general fixes from GILMART@lstc2vm.stortek.com            */00012000
  1075. /* 12/21/91 *_1.2.2b                                                  */00013000
  1076. /* 01/28/92 *_1.2.2c                                                  */00014000
  1077. /* 03/31/92 *_1.2.2d                                                  */00015000
  1078. /* 05/09/92 *_1.2.2e                                                  */00016000
  1079. /*=========================== HISTORY ================================*/00017000
  1080. /**                                                                     00018000
  1081.     Copyright (C) 1991  Paul J. Campbell                                00019000
  1082.                                                                         00020000
  1083.     This program is free software; you can redistribute it and/or modify00021000
  1084.     it under the terms of the MITRE Corporation General Public License a00022000
  1085.     published by the MITRE Corporation                                  00023000
  1086.                                                                         00024000
  1087.     This program is distributed in the hope that it will be useful,     00025000
  1088.     but WITHOUT ANY WARRANTY; without even the implied warranty of      00026000
  1089.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the       00027000
  1090.     MITRE General Public License for more details.                      00028000
  1091.                                                                         00029000
  1092.     You should have received a copy of the MITRE General Public License 00030000
  1093.     along with this program; if not, write to the MITRE Corporation.    00031000
  1094.                                                                         00032000
  1095. **/                                                                     00033000
  1096. trace(o)                                                                00034000
  1097. address xedit                                                           00035000
  1098. 'cms globalv select vmnntp'                                             00036000
  1099. 'cms globalv get version'                                               00037000
  1100. 'cms globalv get newsgroup'                                             00038000
  1101. 'cms globalv get postflag'                                              00039000
  1102. set case mixed ignore                                                   00040000
  1103. set lrecl '*'                                                           00041000
  1104. set recfm v                                                             00042000
  1105. set trunc '*'                                                           00043000
  1106. set zone '1 *'                                                          00044000
  1107. set spill word                                                          00045000
  1108. set linend off                                                          00046000
  1109. set prefix off                                                          00047000
  1110. set scale off                                                           00048000
  1111. set stay on                                                             00049000
  1112. set nulls on                                                            00050000
  1113. set synonym send    4 command file                                      00051000
  1114. set synonym cancel  6 command quit                                      00052000
  1115. set pf01 command help cms note                                          00053000
  1116. set pf05 command file                                                   00054000
  1117. set pf04 command get userid() 'SIGNATUR'                                00055000
  1118. set pf09 command sos linedel                                            00056000
  1119. set pf13 command help cms note                                          00057000
  1120. set pf17 command file                                                   00058000
  1121. set pf21 command sos linedel                                            00059000
  1122. 'set reserved 1 green none high '||,                                    00060000
  1123.                   center('*** NNR/VM ('||version||') ***',80)           00061000
  1124. 'set reserved 2 green none high Posting to '||newsgroup                 00062000
  1125. 'set reserved -5 green none nohigh '||,                                 00063000
  1126.   '1= Help     2= Add line 3= Quit      4= Sign     5= Save     '||,    00064000
  1127.   ' 6= ?'                                                               00065000
  1128. 'set reserved -4 green none nohigh '||,                                 00066000
  1129.   '7= Backward 8= Forward  9= Del line 10= Rgtleft 11= Spltjoin '||,    00067000
  1130.   '12= Cursor'                                                          00068000
  1131. 'set msgline on -3 13'                                                  00069000
  1132. 'set cmstype ht'                                                        00070000
  1133. cms state n$n$t$p$ p$o$s$t$ a                                           00071000
  1134. if rc=0 then                                                            00072000
  1135.   do                                                                    00073000
  1136.    get n$n$t$p$ p$o$s$t$                                                00074000
  1137.    'TOP'                                                                00075000
  1138.    if postflag^='MAIL' & postflag^='RESUME' then                        00076000
  1139.      do                                                                 00077000
  1140.        'CHANGE //>/* 1 '                                                00078000
  1141.        'TOP'                                                            00079000
  1142.      end                                                                00080000
  1143.    do while (Queued()>0)                                                00081000
  1144.      parse pull line                                                    00082000
  1145.      'INPUT' line                                                       00083000
  1146.    end                                                                  00084000
  1147.    'TOP'                                                                00085000
  1148.   end                                                                   00086000
  1149. 'set cmstype rt'                                                        00087000
  1150. exit                                                                    00088000
  1151. :READ  NNR$XEDI $XEDIT   D2 NNR130 05/09/92 21:57:59                            
  1152. /**---------------------------------------------------------------**/   00001000
  1153. /** Network News Reader                                           **/   00002000
  1154. /** file nnr$xedi xedit                                           **/   00003000
  1155. /**---------------------------------------------------------------**/   00004000
  1156. /*====================== NNR$XEDI HISTORY ============================*/00005000
  1157. /* 08/21/91 M_1.2.0                                                   */00006000
  1158. /* 09/02/91 general fixes                                             */00007000
  1159. /* 09/02/91 handle disk full for "Groups Read"                        */00008000
  1160. /* 09/02/91 add "reduce" pfk (eliminate "*" from headers screen)      */00009000
  1161. /* 09/04/91 add mark/unmark                                           */00010000
  1162. /* 09/14/91 general fixes/clean up                                    */00011000
  1163. /* 09/16/91 M_1.2.1                                                   */00012000
  1164. /* 09/21/91 fix the handling of the first article remembered          */00013000
  1165. /* 10/02/91 fix zero out group syndrome                               */00014000
  1166. /* 10/10/91 replace MAIL and POST screens                             */00015000
  1167. /* 10/10/91 M_1.2.2                                                   */00016000
  1168. /* 11/12/91 fix posting                                               */00017000
  1169. /* 11/29/91 M_1.2.2a                                                  */00018000
  1170. /* 12/08/91 STKBUGS1/STKBUGS2 from GILMART@lstc2vm.stortek.com        */00019000
  1171. /* 12/08/91 remove cursor pfk, force ENTER to do same thing           */00020000
  1172. /* 12/08/91 add next group function (previous group PG from cmd line) */00021000
  1173. /* 12/21/91 log/nolog update from COURCOUL@VMTECQRO.QRO.ITESM.MX      */00022000
  1174. /* 12/21/91 add ability to dynamically change some user preferences   */00023000
  1175. /* 12/29/91 change headers display eliminate date,article number      */00024000
  1176. /* 12/29/91 add ability to dynamically change header display          */00025000
  1177. /* 12/21/91 *_1.2.2b                                                  */00026000
  1178. /*          * display 205 message                                     */00027000
  1179. /*          * eliminate excess baggage.                               */00028000
  1180. /*          * fix another memory problem.                             */00029000
  1181. /*          * add subject to article display                          */00030000
  1182. /*          * fix article tracking after mail or post                 */00031000
  1183. /*          * use only personal_subscriptions for session (parm "p_s")*/00032000
  1184. /*          * update groups on the fly, fix for general case          */00033000
  1185. /*          * work in conjunction with fx122c7s (nnr 1.5.11 or older) */00034000
  1186. /*          * fix problem with multiple receive buffers(rextcpip only)*/00035000
  1187. /*          * fix from GILMART@lstc2vm.stortek.com                    */00036000
  1188. /* 01/28/92 *_1.2.2c                                                  */00037000
  1189. /*          * fix from GILMART@lstc2vm.stortek.com (sort)             */00038000
  1190. /*          * fix from GILMART@lstc2vm.stortek.com (mail/post '.')    */00039000
  1191. /*          * eliminate useless pfks for all_news                     */00040000
  1192. /*          * clean up quit messages                                  */00041000
  1193. /*          * add counter for shli and headers screens                */00042000
  1194. /*          * add novalue routines (for compile)                      */00043000
  1195. /*          * fix newgroups detection and list                        */00044000
  1196. /*          * fix all_news + fix new_news                             */00045000
  1197. /*          * add post as a parameter to nnr                          */00046000
  1198. /*          * switch translate tables (from REXTCPIP, thanks KenH)    */00047000
  1199. /*          * add multiple server capability                          */00048000
  1200. /*          * fix article map problem                                 */00049000
  1201. /*          * fix error detection and control                         */00050000
  1202. /* 03/31/92   1.2.2d                                                  */00051000
  1203. /*          * fix from GILMART@lstc2vm.stortek.com (preferences hook) */00052000
  1204. /*          * streamline hli processing, simplifies all_news, new_news*/00053000
  1205. /*          * breakout hli into individual parts, indexed separately  */00054000
  1206. /*          * dynamic addition/subtraction to/from pers_subs          */00055000
  1207. /*          * edit mode s                                             */00056000
  1208. /*          * add multiple personal subscriptions                     */00057000
  1209. /*          * fix negative article count (display)                    */00058000
  1210. /*          * only subscribe if article has been read while in headers*/00059000
  1211. /*          * fine grain lines/article limit analysis                 */00060000
  1212. /*          * fix from GILMART@lstc2vm.stortek.com ( unmark thread)   */00061000
  1213. /* 05/09/92   1.2.2e                                                  */00062000
  1214. /*=========================== HISTORY ================================*/00063000
  1215. /**                                                                     00064000
  1216.     Copyright (C) 1991  Paul J. Campbell                                00065000
  1217.                                                                         00066000
  1218.     This program is free software; you can redistribute it and/or modify00067000
  1219.     it under the terms of the MITRE Corporation General Public License a00068000
  1220.     published by the MITRE Corporation                                  00069000
  1221.                                                                         00070000
  1222.     This program is distributed in the hope that it will be useful,     00071000
  1223.     but WITHOUT ANY WARRANTY; without even the implied warranty of      00072000
  1224.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the       00073000
  1225.     MITRE General Public License for more details.                      00074000
  1226.                                                                         00075000
  1227.     You should have received a copy of the MITRE General Public License 00076000
  1228.     along with this program; if not, write to the MITRE Corporation.    00077000
  1229. **/                                                                     00078000
  1230. signal on novalue                                                       00079000
  1231. Trace('N');                                                             00080000
  1232. Address XEDIT                                                           00081000
  1233. 'Set ctlchar' '29'x 'escape'                                            00082000
  1234. 'Set ctlchar @ protect red high'                                        00083000
  1235. 'Set ctlchar' '4a'x 'protect yellow high'                               00084000
  1236. 'Set ctlchar ! protect blue nohigh'                                     00085000
  1237. 'Set ctlchar $ noprotect turq high'                                     00086000
  1238. 'Set ctlchar * noprotect white nohigh'                                  00087000
  1239. 'Set ctlchar & protect pink nohigh'                                     00088000
  1240. 'Set ctlchar ^ protect green nohigh'                                    00089000
  1241. 'Extract /lscreen'                                                      00090000
  1242. 'Set msgline on' lscreen.1-3 '2 overlay'                                00091000
  1243. 'Set CMDline BOTTOM'                                                    00092000
  1244. 'SET PF04 ONLY dummy'                                                   00093000
  1245. 'SET PF16 ONLY dummy'                                                   00094000
  1246. Address COMMAND 'GLOBALV SELECT VMNNTP'                                 00095000
  1247. Address COMMAND 'GLOBALV GET VERSION'                                   00096000
  1248. Address COMMAND 'GLOBALV GET THISNODE'                                  00097000
  1249. Address COMMAND 'GLOBALV GET NEWSGROUP'                                 00098000
  1250. Address COMMAND 'GLOBALV GET SOCKET'                                    00099000
  1251. Address COMMAND 'GLOBALV GET IPADDR'                                    00100000
  1252. Address COMMAND 'GLOBALV GET YYMMDD'                                    00101000
  1253. Address COMMAND 'GLOBALV GET NGDATE'                                    00102000
  1254. Address COMMAND 'GLOBALV GET NEWNEWS'                                   00103000
  1255. Address COMMAND 'GLOBALV GET POSTONLY'                                  00104000
  1256. /*-----------------------------------------------------------------*/   00105000
  1257. /* Driver routine for the main menu screen.                        */   00106000
  1258. /*-----------------------------------------------------------------*/   00107000
  1259. Address COMMAND 'GLOBALV SETL POWER QUIT'                               00108000
  1260. Address COMMAND 'GLOBALV SETL XHEADER1 From 20'                  /*stk*/00109000
  1261. Address COMMAND 'GLOBALV SETL XHEADER2 Subject 99'               /*stk*/00110000
  1262. nntprc=RXInital(ipaddr)                                                 00111000
  1263. say nntprc                                                              00112000
  1264. if word(nntprc,1)^='200' & word(nntprc,1)^='201' then                   00113000
  1265.   do                                                                    00114000
  1266.     Address COMMAND 'GLOBALV SETL STATUS' nntprc                        00115000
  1267.     nntprc=RXTermin()                                                   00116000
  1268.     Address COMMAND 'DESBUF'                                            00117000
  1269.     'QUIT'                                                              00118000
  1270.     Exit                                                                00119000
  1271.   end                                                                   00120000
  1272.                                                                         00121000
  1273. if postonly then /* we can save ourselves a lot of work */              00122000
  1274.   do                                                                    00123000
  1275.     if newsgroup^='' then                                               00124000
  1276.       do                                                                00125000
  1277.         status=STATUS_Response('GROUP' newsgroup)                       00126000
  1278.         if word(Status,1)='211' then                                    00127000
  1279.           Call Post$Mail('CMS')                                         00128000
  1280.         else if word(Status,1)='411' then                               00129000
  1281.           say 'No such news group "'newsgroup'"!'                       00130000
  1282.         else                                                            00131000
  1283.           say Status                                                    00132000
  1284.       end                                                               00133000
  1285.     else                                                                00134000
  1286.       say 'You need to specify a news group!',                          00135000
  1287.           'i.e. "NNR news.group (POST"'                                 00136000
  1288.     Call Exit_QQuit                                                     00137000
  1289.   end                                                                   00138000
  1290.                                                                         00139000
  1291. updates.=''                                                             00140000
  1292. update.=''                                                              00141000
  1293. item.=''                                                                00142000
  1294. parse var ipaddr oct1 '.' oct2 '.' oct3 '.' oct4                        00143000
  1295. servaddr=right('0'||d2x(oct1),2)||,                                     00144000
  1296.          right('0'||d2x(oct2),2)||,                                     00145000
  1297.          right('0'||d2x(oct3),2)||,                                     00146000
  1298.          right('0'||d2x(oct4),2)                                        00147000
  1299. Address COMMAND 'SET CMSTYPE HT'                                        00148000
  1300. Address COMMAND 'EXECIO * DISKR' servaddr 'NNReader A ( STEM UPDATES.'  00149000
  1301. GRrc=rc                                                                 00150000
  1302. Address COMMAND 'SET CMSTYPE RT'                                        00151000
  1303. if GRrc=0 then                                                          00152000
  1304.   do                                                                    00153000
  1305.     Address COMMAND 'FINIS' servaddr 'NNReader A'                       00154000
  1306.     /* test structure of NNReader file. we will have to do this         00155000
  1307.        until everyone has been converted and we know what were          00156000
  1308.        dealing with.                                           */       00157000
  1309.     parse var updates.1 teststruct . . '$' . '$*$' .                    00158000
  1310.     if index(teststruct,'4a'x)>0 then                                   00159000
  1311.       hliflag=1                                                         00160000
  1312.     else                                                                00161000
  1313.       hliflag=0                                                         00162000
  1314.     if hliflag then                                                     00163000
  1315.       do                                                                00164000
  1316.         parse var updates.1 hli '4a'x updateptr                         00165000
  1317.         updateptr=word(updateptr,1)                                     00166000
  1318.       end                                                               00167000
  1319.     else                                                                00168000
  1320.       updateptr=word(updates.1,1)                                       00169000
  1321.     do i=1 to updates.0                                                 00170000
  1322.       if hliflag then                                                   00171000
  1323.         parse var updates.i hli '4a'x updates.i                         00172000
  1324.       else                                                              00173000
  1325.         hli=''                                                          00174000
  1326.       group=word(updates.i,1)                                           00175000
  1327.       if (verify(word(updates.i,2),'0123456789')=0)&,                   00176000
  1328.          (word(updates.i,2)^='') then                                   00177000
  1329.         do                                                              00178000
  1330.           update.group.FrstLstLg=subword(updates.i,2)                   00179000
  1331.           update.group.HiLvlIndx=hli                                    00180000
  1332.         end                                                             00181000
  1333.       else                                                              00182000
  1334.         update.group.FrstLstLg=0                                        00183000
  1335.       j=I+1                                                             00184000
  1336.       if hliflag then                                                   00185000
  1337.         parse var updates.j hli '4a'x nextgroup                         00186000
  1338.       else                                                              00187000
  1339.         nextgroup=updates.j                                             00188000
  1340.       update.group.next=word(nextgroup,1)                               00189000
  1341.     end                                                                 00190000
  1342.   end                                                                   00191000
  1343. else                                                                    00192000
  1344.   do                                                                    00193000
  1345.     updateptr='dummy.first.group'                                       00194000
  1346.     group=updateptr                                                     00195000
  1347.     update.group.FrstLstLg='0'                                          00196000
  1348.     Call AddByName('news.announce.newusers')                            00197000
  1349.     Call AddByName('news.answers')                                      00198000
  1350.   end                                                                   00199000
  1351. drop updates.                                                           00200000
  1352. censors.=''                                                             00201000
  1353. censor.=''                                                              00202000
  1354. Address COMMAND 'SET CMSTYPE HT'                                        00203000
  1355. Address COMMAND 'EXECIO * DISKR Censor Groups * ( STEM CENSORS.'        00204000
  1356. Crc=rc                                                                  00205000
  1357. Address COMMAND 'SET CMSTYPE RT'                                        00206000
  1358. if Crc=0 then                                                           00207000
  1359.   do                                                                    00208000
  1360.     Address COMMAND 'FINIS Censor Groups *'                             00209000
  1361.     do i=1 to censors.0                                                 00210000
  1362.       group=strip(censors.i)                                            00211000
  1363.       censor.group=group                                                00212000
  1364.     end                                                                 00213000
  1365.   end                                                                   00214000
  1366. drop censors.                                                           00215000
  1367. if newsgroup='' then                                                    00216000
  1368.   call Main_Menu                                                        00217000
  1369. else if translate(newsgroup)='P_S' then                                 00218000
  1370.   call Personal_Subscriptions                                           00219000
  1371. else                                                                    00220000
  1372.   call Single_Group                                                     00221000
  1373. Exit(999)                                                               00222000
  1374. /*-----------------------------------------------------------------*/   00223000
  1375. /* Add groups to a new nnr user                                    */   00224000
  1376. /*-----------------------------------------------------------------*/   00225000
  1377. AddByName:procedure expose update. updateptr                            00226000
  1378. parse arg newgroup                                                      00227000
  1379. Address COMMAND 'GLOBALV GET SOCKET'                                    00228000
  1380.    status=STATUS_Response('GROUP' newgroup)                             00229000
  1381.    if word(Status,1)='211' then                                         00230000
  1382.      do                                                                 00231000
  1383.        parse var status . . frst_act last_act .                         00232000
  1384.        if last_act=0 then                                               00233000
  1385.          article_log='1 0$'||compress_log('')                           00234000
  1386.        else                                                             00235000
  1387.          article_log=frst_act*1||' '||last_act*1||'$'||,                00236000
  1388.                compress_log(copies('0',max(0,last_act-frst_act+1)))     00237000
  1389.        Call Group_Add(newgroup)                                         00238000
  1390.      end                                                                00239000
  1391. Return                                                                  00240000
  1392. /*-----------------------------------------------------------------*/   00241000
  1393. /* Routine Handle signal novalue                                   */   00242000
  1394. /*-----------------------------------------------------------------*/   00243000
  1395. NOVALUE:                                                                00244000
  1396. parse source . . myname .                                               00245000
  1397. say "NOVALUE error in" myname "line" sigl":"                            00246000
  1398. say "Source line>" sourceline(sigl)                                     00247000
  1399. Call Exit_QQuit                                                         00248000
  1400. exit(999)                                                               00249000
  1401. /*-----------------------------------------------------------------*/   00250000
  1402. /* Routine to drive single SHLI                                    */   00251000
  1403. /*-----------------------------------------------------------------*/   00252000
  1404. Personal_Subscriptions:                                                 00253000
  1405.   ptr=updateptr                                                         00254000
  1406.   gcount=0                                                              00255000
  1407.   groups.=''                                                            00256000
  1408.   original.=''                                                          00257000
  1409.   do while (update.ptr.next^='')                                        00258000
  1410.     if ptr='dummy.first.group' then ptr=update.ptr.next                 00259000
  1411.     status=STATUS_Response('GROUP' ptr)                                 00260000
  1412.     if word(Status,1)='211' then                                        00261000
  1413.       do                                                                00262000
  1414.         parse var status . . frst_act last_act .                        00263000
  1415.         parse var update.ptr.FrstLstLg frst_rem last_rem '$' log '$*$' .00264000
  1416.         gcount=gcount+1                                                 00265000
  1417.         item.gcount=ptr last_act frst_rem '? 1'                         00266000
  1418.         original.ptr=last_act frst_rem '?'                              00267000
  1419.       end                                                               00268000
  1420.     else                                                                00269000
  1421.       do                                                                00270000
  1422.         if ptr='dummy.first.group' then                                 00271000
  1423.           say status                                                    00272000
  1424.         /* Call Group_Delete(ptr) */                                    00273000
  1425.       end                                                               00274000
  1426.     ptr=update.ptr.next                                                 00275000
  1427.   end                                                                   00276000
  1428.   status=STATUS_Response('GROUP' ptr)                                   00277000
  1429.   if word(Status,1)='211' then                                          00278000
  1430.     do                                                                  00279000
  1431.       parse var status . . frst_act last_act .                          00280000
  1432.       parse var update.ptr.FrstLstLg frst_rem last_rem '$' log '$*$' .  00281000
  1433.       gcount=gcount+1                                                   00282000
  1434.       item.gcount=ptr last_act frst_rem '? 1'                           00283000
  1435.       original.ptr=last_act frst_rem '?'                                00284000
  1436.     end                                                                 00285000
  1437.   else                                                                  00286000
  1438.     do                                                                  00287000
  1439.       if ptr='dummy.first.group' then                                   00288000
  1440.         say status                                                      00289000
  1441.       /* Call Group_Delete(ptr) */                                      00290000
  1442.     end                                                                 00291000
  1443.   item.0=gcount                                                         00292000
  1444.   Address COMMAND 'GLOBALV SET NEWNEWS 1'                               00293000
  1445.   Call SortList                                                         00294000
  1446.   CHGList.=''                                                           00295000
  1447.   Call NNR$SHLI                                                         00296000
  1448.   Call save_articles                                                    00297000
  1449.   Call Exit_QQuit                                                       00298000
  1450. Return                                                                  00299000
  1451. /*-----------------------------------------------------------------*/   00300000
  1452. /* Routine to drive single Group                                   */   00301000
  1453. /*-----------------------------------------------------------------*/   00302000
  1454. Single_Group:                                                           00303000
  1455.   article_log=newsgroup||' '||update.newsgroup.FrstLstLg                00304000
  1456.   parse var update.newsgroup.FrstLstLg frst_rem last_rem '$' log '$*$' .00305000
  1457.   if (frst_rem>=last_rem)&(log='ff'x) then                              00306000
  1458.     newsflag='1'                                                        00307000
  1459.   else                                                                  00308000
  1460.     newsflag='0'                                                        00309000
  1461.   if (censor.newsgroup='') then                                         00310000
  1462.     do                                                                  00311000
  1463.       Address COMMAND 'GLOBALV GET NUMBER'                              00312000
  1464.       Address COMMAND 'GLOBALV SET ARTICLE'                             00313000
  1465.       if (frst_rem=''),                                                 00314000
  1466.         |(translate(frst_rem,'.','0')='.'),                             00315000
  1467.         |^newnews then                                                  00316000
  1468.         frst_rem=0                                                      00317000
  1469.          nntprc=NEWSXHDR(number frst_rem newsgroup newsflag)            00318000
  1470.     end                                                                 00319000
  1471.   else                                                                  00320000
  1472.      Do                                                                 00321000
  1473.        say 'No such news group "'newsgroup'"!'                          00322000
  1474.        Call Exit_QQuit                                                  00323000
  1475.      End                                                                00324000
  1476.   if nntprc^=0 then                                                     00325000
  1477.     do                                                                  00326000
  1478.       if word(nntprc,1)='411' then                                      00327000
  1479.         say 'No such news group "'newsgroup'"!'                         00328000
  1480.       else                                                              00329000
  1481.         say nntprc                                                      00330000
  1482.       Call Exit_QQuit                                                   00331000
  1483.     end                                                                 00332000
  1484.   Address COMMAND 'GLOBALV SET THREAD 0'                                00333000
  1485.   Address COMMAND 'GLOBALV SET REDUCE 0'                                00334000
  1486.   Address COMMAND 'GLOBALV SET REDUCECNT 0'                             00335000
  1487.   article_log=NNR$XHDR(article_log)                                     00336000
  1488.   if newnews then                                                       00337000
  1489.     do                                                                  00338000
  1490.       if article_log='' then                                            00339000
  1491.         do                                                              00340000
  1492.           if last_rem='' then                                           00341000
  1493.             article_log='00 00$'||'ff'x                                 00342000
  1494.           else                                                          00343000
  1495.             article_log=last_rem||' '||last_rem||'$'||'ff'x             00344000
  1496.         end                                                             00345000
  1497.       if update.newsgroup.FrstLstLg='' then                             00346000
  1498.         Call Group_Add(newsgroup)                                       00347000
  1499.       else                                                              00348000
  1500.         update.newsgroup.FrstLstLg=article_log                          00349000
  1501.       call save_articles                                                00350000
  1502.     end                                                                 00351000
  1503.   Call Exit_QQuit                                                       00352000
  1504. Return                                                                  00353000
  1505. /*-----------------------------------------------------------------*/   00354000
  1506. /* Routine to drive main menu                                      */   00355000
  1507. /*-----------------------------------------------------------------*/   00356000
  1508. Main_Menu:                                                              00357000
  1509. nntprc=NEWSNewG(NGDATE)                                                 00358000
  1510. if word(nntprc,1)='-1' then                                             00359000
  1511.   do                                                                    00360000
  1512.     Call Exit_QQuit                                                     00361000
  1513.     say nntprc                                                          00362000
  1514.   end                                                                   00363000
  1515. new.=''                                                                 00364000
  1516. hli.=''                                                                 00365000
  1517. if item.0 > 0 then                                                      00366000
  1518.   do                                                                    00367000
  1519.      hli.0='New_Groups_Since_'yymmdd||' '                               00368000
  1520.      HiQual='New_Groups_Since_'yymmdd                                   00369000
  1521.      hli.HiQual='New_Groups_Since_'yymmdd                               00370000
  1522.      do i=1 to item.0                                                   00371000
  1523.        group=strip(item.i)                                              00372000
  1524.        new.group=group                                                  00373000
  1525.      end                                                                00374000
  1526.   end                                                                   00375000
  1527. else                                                                    00376000
  1528.   hli.0=''                                                              00377000
  1529. nntprc=NEWSList()                                                       00378000
  1530. if word(nntprc,1)^='215' then                                           00379000
  1531.   do                                                                    00380000
  1532.     say nntprc                                                          00381000
  1533.     Call Exit_QQuit                                                     00382000
  1534.   end                                                                   00383000
  1535. i=0                                                                     00384000
  1536. k=0                                                                     00385000
  1537. original.=''                                                            00386000
  1538. do l=1 to list.0                                                        00387000
  1539.   if index(word(list.l,4),'=')=0 then                                   00388000
  1540.     do                                                                  00389000
  1541.       groupchk=word(list.l,1)                                           00390000
  1542.       if censor.groupchk='' then                                        00391000
  1543.         do                                                              00392000
  1544.           i=i+1                                                         00393000
  1545.           item.i=groupchk                                               00394000
  1546.           original.groupchk=subword(list.l,2)                           00395000
  1547.           if new.groupchk^='' then                                      00396000
  1548.             do                                                          00397000
  1549.               k=k+1                                                     00398000
  1550.               hli.HiQual.k=groupchk                                     00399000
  1551.             end                                                         00400000
  1552.         end                                                             00401000
  1553.     end                                                                 00402000
  1554. end                                                                     00403000
  1555. item.0=i                                                                00404000
  1556. hli.HiQual.0=k                                                          00405000
  1557. drop new.                                                               00406000
  1558. drop censor.                                                            00407000
  1559. drop list.                                                              00408000
  1560. Call SortList                                                           00409000
  1561. /**/                                                                    00410000
  1562. k=0                                                                     00411000
  1563. hli.0=hli.0||'Personal_Subscriptions'||' '                              00412000
  1564. HiQual='Personal_Subscriptions'                                         00413000
  1565. hli.HiQual='Personal_Subscriptions'                                     00414000
  1566. do i=1 to item.0                                                        00415000
  1567.   group=item.i                                                          00416000
  1568.   if (update.group.FrstLstLg^=''),                                      00417000
  1569.     &(translate(update.group.FrstLstLg,'.','0')^='.') then              00418000
  1570.     do                                                                  00419000
  1571.       k=k+1                                                             00420000
  1572.       hli.HiQual.k=group                                                00421000
  1573.       if update.group.HiLvlIndx^='' then                                00422000
  1574.         do                                                              00423000
  1575.           tempHiQual='Personal_'||update.group.HiLvlIndx                00424000
  1576.           if hli.tempHiQual.0='' then                                   00425000
  1577.             do                                                          00426000
  1578.               hli.tempHiQual='Personal_'||,                             00427000
  1579.                               update.group.HiLvlIndx||' '               00428000
  1580.               hli.0=hli.0||'Personal_'||,                               00429000
  1581.                     update.group.HiLvlIndx||' '                         00430000
  1582.               hli.tempHiQual.0=1                                        00431000
  1583.             end                                                         00432000
  1584.           else                                                          00433000
  1585.             hli.tempHiQual.0=hli.tempHiQual.0+1                         00434000
  1586.           ptr=hli.tempHiQual.0                                          00435000
  1587.           hli.tempHiQual.ptr=group                                      00436000
  1588.         end                                                             00437000
  1589.     end                                                                 00438000
  1590. end                                                                     00439000
  1591. hli.HiQual.0=k                                                          00440000
  1592. /**/                                                                    00441000
  1593. k=0                                                                     00442000
  1594. parse value item.1 with HiQual . '.' .                                  00443000
  1595. hli.0=hli.0||HiQual||' '                                                00444000
  1596. hli.HiQual=HiQual                                                       00445000
  1597. do i=1 to item.0                                                        00446000
  1598.   parse value item.i with NextHiQual . '.' .                            00447000
  1599.   if NextHiQual^=HiQual then                                            00448000
  1600.         do                                                              00449000
  1601.           hli.HiQual.0=k                                                00450000
  1602.           k=0                                                           00451000
  1603.           HiQual=NextHiQual                                             00452000
  1604.           hli.HiQual=HiQual                                             00453000
  1605.           hli.0=hli.0||HiQual||' '                                      00454000
  1606.         end                                                             00455000
  1607.   k=k+1                                                                 00456000
  1608.   hli.HiQual.k=item.i                                                   00457000
  1609. end                                                                     00458000
  1610. hli.HiQual.0=k                                                          00459000
  1611. drop item.                                                              00460000
  1612. Address COMMAND 'DESBUF'                                                00461000
  1613. index=0                                                                 00462000
  1614. scrbot=lscreen.1-4                                                      00463000
  1615. row=3;col=2                                                             00464000
  1616. flag = 'PHLI'                                                           00465000
  1617. message = ''                                                            00466000
  1618. Do Forever;                                                             00467000
  1619.   Call PHLIscreen;                  /* display main menu screen    */   00468000
  1620.   'Read Nochange Tag'                                                   00469000
  1621.   'Extract /cursor'                                                     00470000
  1622.   row = cursor.1; col = cursor.2;                                       00471000
  1623.   num=0                                                                 00472000
  1624.   Do While(Queued()>0)                                                  00473000
  1625.     num=num+1                                                           00474000
  1626.     Parse Pull QueuedLine.num                                           00475000
  1627.   end                                                                   00476000
  1628.   do i=1 to num                                                         00477000
  1629.     Parse var QueuedLine.i key line column string;                      00478000
  1630.     if key = "RES" Then Nop                                             00479000
  1631.     else SaveQueued=QueuedLine.i                                        00480000
  1632.   end                                                                   00481000
  1633.   Parse Var SaveQueued key line column string;                          00482000
  1634.   Select                                                                00483000
  1635.     When key = "ETK" Then Call Cursor                                   00484000
  1636.     When key = "CMD" Then Call CommandLine                              00485000
  1637.     When key = "PFK" Then Call PFKeys                                   00486000
  1638.     otherwise Call AnythingElse                                         00487000
  1639.   End  /* select */                                                     00488000
  1640. End;  /* Do Forever */                                                  00489000
  1641. Return                                                                  00490000
  1642. /*-----------------------------------------------------------------*/   00491000
  1643. /* Routine to sort list                                            */   00492000
  1644. /* Standard "Shell Sort" (textbook version)                        */   00493000
  1645. /*-----------------------------------------------------------------*/   00494000
  1646. SortList:                                                               00495000
  1647.    Procedure Expose Item.                                               00496000
  1648.    Do Gap = 797161 By 0 while Gap>1                                     00497000
  1649.       Gap = Gap%3                                                       00498000
  1650.       Do Scan = Gap+1 to item.0                                         00499000
  1651.          Vacant = Scan - Gap                                            00500000
  1652.          If item.Vacant>item.Scan Then Do                               00501000
  1653.             Temp = item.Scan                                            00502000
  1654.             item.Scan = item.Vacant                                     00503000
  1655.             Do Bubble = Vacant-Gap to 1 By -Gap ,                       00504000
  1656.                    While item.Bubble>Temp                               00505000
  1657.                item.Vacant = item.Bubble                                00506000
  1658.                Vacant = Bubble                                          00507000
  1659.                End Bubble                                               00508000
  1660.             item.Vacant = Temp                                          00509000
  1661.            End                                                          00510000
  1662.          End Scan                                                       00511000
  1663.       End Gap                                                           00512000
  1664.    Return                                                               00513000
  1665. /*-----------------------------------------------------------------*/   00514000
  1666. /* Routine to display the main menu screen.                        */   00515000
  1667. /*-----------------------------------------------------------------*/   00516000
  1668. PHLIscreen:                         /* set each line of the screen */   00517000
  1669.    'Set Reserved' 1 'noh' '29'x'@               ',                      00518000
  1670.                   center('*** NNR/VM ('||version||') ***',35),          00519000
  1671.                   right('PHLI/Main',25),                                00520000
  1672.                   '29'x'!                    '                          00521000
  1673.    'Set Reserved' 2 'noh' '29'x'@ High Level Index' '29'x'!'            00522000
  1674.    Do scrpos=3 to lscreen.1-4                                           00523000
  1675.    index=index+1                                                        00524000
  1676.    pindex=word(hli.0,index)                                             00525000
  1677.    sindex=word(hli.0,index+(scrbot-2))                                  00526000
  1678.    tindex=word(hli.0,index+2*(scrbot-2))                                00527000
  1679.    'Set Reserved' scrpos 'noh' '29'x'*'||Left(hli.pindex,25)||'|',      00528000
  1680.                            '29'x'*'||Left(hli.sindex,25)||'|',          00529000
  1681.                            '29'x'*'||Left(hli.tindex,25)'29'x'! '       00530000
  1682.    End                                                                  00531000
  1683.    'Set Reserved' lscreen.1-3 'noh'                                     00532000
  1684.    'Set Reserved' lscreen.1-2 'high',                                   00533000
  1685.                                  ' 1= Help     ',                       00534000
  1686.                                ||'2= All_News ',                        00535000
  1687.                                ||'3= Quit     ',                        00536000
  1688.                                ||' 4= New_News ',                       00537000
  1689.                                ||' 5=          ',                       00538000
  1690.                                ||' 6=         '                         00539000
  1691.    'Set Reserved' lscreen.1-1 'high',                                   00540000
  1692.                                  ' 7= Backward ',                       00541000
  1693.                                ||'8= Forward  ',                        00542000
  1694.                                ||'9=          ',                        00543000
  1695.                                ||'10=          ',                       00544000
  1696.                                ||'11=          ',                       00545000
  1697.                                ||'12=         '                         00546000
  1698.    If message ^= "" Then                                                00547000
  1699.       Do;                                                               00548000
  1700.          'EMSG' message                                                 00549000
  1701.          message = '';                                                  00550000
  1702.       End;                                                              00551000
  1703.    'Cursor screen' row col                                              00552000
  1704. Return                                                                  00553000
  1705. /*-----------------------------------------------------------------*/   00554000
  1706. /* update linked list for the articles read                        */   00555000
  1707. /*-----------------------------------------------------------------*/   00556000
  1708. Group_Add: procedure expose update. updateptr article_log               00557000
  1709. parse arg group                                                         00558000
  1710. ptr=updateptr                                                           00559000
  1711. do while (update.ptr.next^='')                                          00560000
  1712.   ptr=update.ptr.next                                                   00561000
  1713. end                                                                     00562000
  1714. update.ptr.next=group                                                   00563000
  1715. update.group.FrstLstLg=article_log                                      00564000
  1716. update.group.next=''                                                    00565000
  1717. return                                                                  00566000
  1718. /*-----------------------------------------------------------------*/   00567000
  1719. /* update linked list for the articles read                        */   00568000
  1720. /*-----------------------------------------------------------------*/   00569000
  1721. Group_Delete: procedure expose update. updateptr                        00570000
  1722. parse arg group                                                         00571000
  1723. ptr=updateptr                                                           00572000
  1724. if ptr=group then                                                       00573000
  1725.   do                                                                    00574000
  1726.     updateptr=update.ptr.next                                           00575000
  1727.     update.group.FrstLstLg=''                                           00576000
  1728.     update.group.HiLvlIndx=''                                           00577000
  1729.     update.group.next=''                                                00578000
  1730.     return                                                              00579000
  1731.   end                                                                   00580000
  1732. do while (ptr^=group&ptr^='')                                           00581000
  1733.   prevptr=ptr                                                           00582000
  1734.   ptr=update.ptr.next                                                   00583000
  1735. end                                                                     00584000
  1736. if ptr='' then                                                          00585000
  1737.   do                                                                    00586000
  1738.     say 'update delete logic problem'                                   00587000
  1739.     return                                                              00588000
  1740.   end                                                                   00589000
  1741. update.prevptr.next=update.ptr.next                                     00590000
  1742. update.group.FrstLstLg=''                                               00591000
  1743. update.group.next=''                                                    00592000
  1744. return                                                                  00593000
  1745. /*-----------------------------------------------------------------*/   00594000
  1746. /* update linked list for the articles read                        */   00595000
  1747. /*-----------------------------------------------------------------*/   00596000
  1748. save_articles:                                                          00597000
  1749. group=updateptr                                                         00598000
  1750. if group='' then return                                                 00599000
  1751. do while (update.group.next^='')                                        00600000
  1752.   tempstr=update.group.HiLvlIndx||'4a'x||group||' '||,                  00601000
  1753.           update.group.FrstLstLg                                        00602000
  1754.   Address COMMAND 'EXECIO 1 DISKW Groups New A 0 V 2048 (VAR TEMPSTR'   00603000
  1755.   if rc^=0 then                                                         00604000
  1756.     do                                                                  00605000
  1757.       Address COMMAND 'GLOBALV SET DISKFULL YES'                        00606000
  1758.       return                                                            00607000
  1759.     end                                                                 00608000
  1760.   group=update.group.next                                               00609000
  1761. end                                                                     00610000
  1762. tempstr=update.group.HiLvlIndx||'4a'x||group||' '||,                    00611000
  1763.         update.group.FrstLstLg                                          00612000
  1764. Address COMMAND 'EXECIO 1 DISKW Groups New A 0 V 2048 (VAR TEMPSTR'     00613000
  1765. if rc^=0 then                                                           00614000
  1766.   Address COMMAND 'GLOBALV SET DISKFULL YES'                            00615000
  1767. Address COMMAND 'FINIS Groups New A'                                    00616000
  1768. return                                                                  00617000
  1769. /*-----------------------------------------------------------------*/   00618000
  1770. /* Routine to pick off the command line.                           */   00619000
  1771. /*-----------------------------------------------------------------*/   00620000
  1772. CommandLine:                                                            00621000
  1773.    line=translate(line);                                                00622000
  1774.    If (Abbrev('QQUIT',line,2) | line = 'QUIT') Then                     00623000
  1775.      Do;                                                                00624000
  1776.        Address COMMAND 'DESBUF'                                         00625000
  1777.        Call Exit_Quit                                                   00626000
  1778.      End;                                                               00627000
  1779.    else If (line = 'SUBSET') Then                                       00628000
  1780.      Call Subset                                                        00629000
  1781.    else                                                                 00630000
  1782.      Do                                                                 00631000
  1783.        message = 'Unsupported command:' line column string;             00632000
  1784.        index=index-(scrbot-2)                                           00633000
  1785.      End                                                                00634000
  1786. Return                                                                  00635000
  1787. /*-----------------------------------------------------------------*/   00636000
  1788. /* Routine to handle the PFKs key.                                 */   00637000
  1789. /*-----------------------------------------------------------------*/   00638000
  1790. PFKeys:                                                                 00639000
  1791.    Call PFKmap                                                          00640000
  1792.    If Line=1 then                                                       00641000
  1793.      do                                                                 00642000
  1794.        Call NNR$HELP(0)                                                 00643000
  1795.        index=index-(scrbot-2)                                           00644000
  1796.      end                                                                00645000
  1797.    else If Line=2 then Call All_News                                    00646000
  1798.    else If Line=3 then call Exit_Quit                                   00647000
  1799.    else If Line=4 then call New_News                                    00648000
  1800.    else If Line=7 then call PHLI_Backward                               00649000
  1801.    else If Line=8 then call PHLI_Forward                                00650000
  1802.    else Call UnsupportedPFK                                             00651000
  1803. Return                                                                  00652000
  1804. /*-----------------------------------------------------------------*/   00653000
  1805. /* Routine to handle PFK Backward.                                 */   00654000
  1806. /*-----------------------------------------------------------------*/   00655000
  1807. PHLI_Backward:                                                          00656000
  1808.    row=3;col=2;                                                         00657000
  1809.    if index-4*(scrbot-2) > 1 then                                       00658000
  1810.      index=index-4*(scrbot-2)                                           00659000
  1811.    else                                                                 00660000
  1812.      Do                                                                 00661000
  1813.        message='Reached Top of File'                                    00662000
  1814.        index=0                                                          00663000
  1815.      End                                                                00664000
  1816. Return                                                                  00665000
  1817. /*-----------------------------------------------------------------*/   00666000
  1818. /* Routine to handle PFK Forward.                                  */   00667000
  1819. /*-----------------------------------------------------------------*/   00668000
  1820. PHLI_Forward:                                                           00669000
  1821.    row=3;col=2;                                                         00670000
  1822.    If index+3*(scrbot-2) < words(hli.0)+scrbot-2 then                   00671000
  1823.      index=index+2*(scrbot-2)                                           00672000
  1824.    else                                                                 00673000
  1825.      Do                                                                 00674000
  1826.        message='Reached End of File'                                    00675000
  1827.        index=index-(scrbot-2)                                           00676000
  1828.      End                                                                00677000
  1829. Return                                                                  00678000
  1830. /*-----------------------------------------------------------------*/   00679000
  1831. /* Routine to handle PFK Cursor.                                   */   00680000
  1832. /*-----------------------------------------------------------------*/   00681000
  1833. Cursor:                                                                 00682000
  1834.   'CURSOR HOME'                                                         00683000
  1835.   'EXTRACT /CURSOR/'                                                    00684000
  1836.   row=cursor.1                                                          00685000
  1837.   col=cursor.2                                                          00686000
  1838.   index=index-(scrbot-2)                                                00687000
  1839. Return                                                                  00688000
  1840. /*-----------------------------------------------------------------*/   00689000
  1841. /* Routine to handle anything else.                                */   00690000
  1842. /*-----------------------------------------------------------------*/   00691000
  1843. AnythingElse:                                                           00692000
  1844.    index=index-(scrbot-2)                                               00693000
  1845. Return                                                                  00694000
  1846. /*-----------------------------------------------------------------*/   00695000
  1847. /* Routine to handle PFK Mapping.                                  */   00696000
  1848. /*-----------------------------------------------------------------*/   00697000
  1849. PFKmap:                                                                 00698000
  1850.   if line>12 then line=line-12                                          00699000
  1851. Return                                                                  00700000
  1852. /*-----------------------------------------------------------------*/   00701000
  1853. /* Routine to handle PFK All_News.                                 */   00702000
  1854. /*-----------------------------------------------------------------*/   00703000
  1855. All_News:                                                               00704000
  1856.    if row>2&row<=scrbot then                                            00705000
  1857.      do                                                                 00706000
  1858.        if col<27 then ptr=index-scrbot+row                              00707000
  1859.        else if col<53 then ptr=index+(scrbot-2)-scrbot+row              00708000
  1860.        else ptr=index+2*(scrbot-2)-scrbot+row                           00709000
  1861.        if ptr>words(hli.0) then                                         00710000
  1862.          message='Cursor not on high level index!'                      00711000
  1863.        else                                                             00712000
  1864.          do                                                             00713000
  1865.            Address COMMAND 'DESBUF'                                     00714000
  1866.            item.=''                                                     00715000
  1867.            ptr=word(hli.0,ptr)                                          00716000
  1868.            do i=1 to hli.ptr.0                                          00717000
  1869.              group=hli.ptr.i                                            00718000
  1870.              item.i=group original.group 0                              00719000
  1871.            end                                                          00720000
  1872.            item.0=hli.ptr.0                                             00721000
  1873.            Address COMMAND 'GLOBALV SET NEWNEWS 0'                      00722000
  1874.            Call NNR$SHLI                                                00723000
  1875.            Drop item.                                                   00724000
  1876.          end                                                            00725000
  1877.      end                                                                00726000
  1878.    else                                                                 00727000
  1879.      message='Cursor not on high level index!'                          00728000
  1880.    index=index-(scrbot-2)                                               00729000
  1881. Return                                                                  00730000
  1882. /*-----------------------------------------------------------------*/   00731000
  1883. /* Routine to handle SUBSET command.                               */   00732000
  1884. /*-----------------------------------------------------------------*/   00733000
  1885. Subset:                                                                 00734000
  1886.    'CMS'                                                                00735000
  1887.    index=index-(scrbot-2)                                               00736000
  1888. Return                                                                  00737000
  1889. /*-----------------------------------------------------------------*/   00738000
  1890. /* Routine to handle PFK Quit.                                     */   00739000
  1891. /*-----------------------------------------------------------------*/   00740000
  1892. Exit_Quit:                                                              00741000
  1893.   Address COMMAND 'GLOBALV GET SOCKET'                                  00742000
  1894.   call save_articles                                                    00743000
  1895.   nntprc=NEWSQuit()                                                     00744000
  1896.   say nntprc                                                            00745000
  1897.   if word(nntprc,1)='205' then                                          00746000
  1898.     Address COMMAND 'GLOBALV SETL STATUS' 0                             00747000
  1899.   else                                                                  00748000
  1900.     Address COMMAND 'GLOBALV SETL STATUS' 1                             00749000
  1901.   nntprc=RXTermin()                                                     00750000
  1902.   Address COMMAND 'DESBUF'                                              00751000
  1903.   'QUIT'                                                                00752000
  1904.   Exit;                                                                 00753000
  1905. Return                                                                  00754000
  1906. /*-----------------------------------------------------------------*/   00755000
  1907. /* Routine to handle PFK Quit/no article save                      */   00756000
  1908. /*-----------------------------------------------------------------*/   00757000
  1909. Exit_QQuit:                                                             00758000
  1910.   Address COMMAND 'GLOBALV GET SOCKET'                                  00759000
  1911.   nntprc=NEWSQuit()                                                     00760000
  1912.   say nntprc                                                            00761000
  1913.   if word(nntprc,1)='205' then                                          00762000
  1914.     Address COMMAND 'GLOBALV SETL STATUS' 0                             00763000
  1915.   else                                                                  00764000
  1916.     Address COMMAND 'GLOBALV SETL STATUS' 1                             00765000
  1917.   nntprc=RXTermin()                                                     00766000
  1918.   Address COMMAND 'DESBUF'                                              00767000
  1919.   'QUIT'                                                                00768000
  1920.   Exit;                                                                 00769000
  1921. Return                                                                  00770000
  1922. /*-----------------------------------------------------------------*/   00771000
  1923. /* Routine to handle PFK New_News.                                 */   00772000
  1924. /*-----------------------------------------------------------------*/   00773000
  1925. New_News:                                                               00774000
  1926.    if row>2&row<=scrbot then                                            00775000
  1927.      do                                                                 00776000
  1928.        if col<27 then ptr=index-scrbot+row                              00777000
  1929.        else if col<53 then ptr=index+(scrbot-2)-scrbot+row              00778000
  1930.        else ptr=index+2*(scrbot-2)-scrbot+row                           00779000
  1931.        if ptr>words(hli.0) then                                         00780000
  1932.          message='Cursor not on high level index!'                      00781000
  1933.        else                                                             00782000
  1934.          do                                                             00783000
  1935.            Address COMMAND 'DESBUF'                                     00784000
  1936.            Address COMMAND 'GLOBALV SET NEWNEWS 1'                      00785000
  1937.            item.=''                                                     00786000
  1938.            ptr=word(hli.0,ptr)                                          00787000
  1939.            do i=1 to hli.ptr.0                                          00788000
  1940.              group=hli.ptr.i                                            00789000
  1941.              frst_rem=word(update.group.FrstLstLg,1)                    00790000
  1942.              if (frst_rem^='') then                                     00791000
  1943.                 do                                                      00792000
  1944.                   item.i=group,                                         00793000
  1945.                          word(original.group,1),                        00794000
  1946.                          frst_rem,                                      00795000
  1947.                          word(original.group,3),                        00796000
  1948.                          1                                              00797000
  1949.                 end                                                     00798000
  1950.               else                                                      00799000
  1951.                 do                                                      00800000
  1952.                   item.i=group original.group 0                         00801000
  1953.                 end                                                     00802000
  1954.            end                                                          00803000
  1955.            item.0=hli.ptr.0                                             00804000
  1956.            CHGList.=''                                                  00805000
  1957.            Call NNR$SHLI                                                00806000
  1958.            Drop item.                                                   00807000
  1959.            if CHGList.0 then                                            00808000
  1960.              Call Update_hli(ptr)                                       00809000
  1961.            Drop CHGList.                                                00810000
  1962.          end                                                            00811000
  1963.      end                                                                00812000
  1964.    else                                                                 00813000
  1965.      message='Cursor not on high level index!'                          00814000
  1966.    index=index-(scrbot-2)                                               00815000
  1967. Return                                                                  00816000
  1968. /*-----------------------------------------------------------------*/   00817000
  1969. /* Routine to adjust Personal_...                                  */   00818000
  1970. /*-----------------------------------------------------------------*/   00819000
  1971. Update_Hli:procedure expose hli. CHGList. updateptr update.             00820000
  1972. parse arg ptr                                                           00821000
  1973.   /* the deletes will take care of themselves */                        00822000
  1974.   HiQual='Personal_Subscriptions'                                       00823000
  1975.   NewHiQ='Personal_Subscriptions '                                      00824000
  1976.   BldHiQ=''                                                             00825000
  1977.   do i=1 to words(hli.0)                                                00826000
  1978.     testHiQual=word(hli.0,i)                                            00827000
  1979.     if index(testHiQual,'Personal_')>0 then                             00828000
  1980.       do                                                                00829000
  1981.         if testHiQual=HiQual then                                       00830000
  1982.           iterate                                                       00831000
  1983.         else                                                            00832000
  1984.           hli.testHiQual.0=''                                           00833000
  1985.       end                                                               00834000
  1986.     else                                                                00835000
  1987.       BldHiQ=BldHiQ||word(hli.0,i)||' '                                 00836000
  1988.   end                                                                   00837000
  1989.   k=0                                                                   00838000
  1990.   do i=1 to hli.HiQual.0                                                00839000
  1991.     group=hli.HiQual.i                                                  00840000
  1992.     if (update.group.FrstLstLg^=''),                                    00841000
  1993.       &(translate(update.group.FrstLstLg,'.','0')^='.') then            00842000
  1994.       do                                                                00843000
  1995.         k=k+1                                                           00844000
  1996.         hli.HiQual.k=group                                              00845000
  1997.         if update.group.HiLvlIndx^='' then                              00846000
  1998.           do                                                            00847000
  1999.             tempHiQual='Personal_'||update.group.HiLvlIndx              00848000
  2000.             if hli.tempHiQual.0='' then                                 00849000
  2001.               do                                                        00850000
  2002.                 hli.tempHiQual='Personal_'||,                           00851000
  2003.                               update.group.HiLvlIndx||' '               00852000
  2004.                 NewHiQ=NewHiQ||'Personal_'||,                           00853000
  2005.                     update.group.HiLvlIndx||' '                         00854000
  2006.                 hli.tempHiQual.0=1                                      00855000
  2007.               end                                                       00856000
  2008.             else                                                        00857000
  2009.               hli.tempHiQual.0=hli.tempHiQual.0+1                       00858000
  2010.             tptr=hli.tempHiQual.0                                       00859000
  2011.             hli.tempHiQual.tptr=group                                   00860000
  2012.           end                                                           00861000
  2013.       end                                                               00862000
  2014.   end                                                                   00863000
  2015.   hli.HiQual.0=k                                                        00864000
  2016.   /* add new subscriptions to the end of the list */                    00865000
  2017.   if hli.ptr.0 <> '' then                                               00866000
  2018.     do                                                                  00867000
  2019.       do i=1 to hli.ptr.0                                               00868000
  2020.         group=hli.ptr.i                                                 00869000
  2021.         if CHGList.group='Add' then                                     00870000
  2022.           do                                                            00871000
  2023.             k=k+1                                                       00872000
  2024.             hli.HiQual.k=group                                          00873000
  2025.             if update.group.HiLvlIndx^='' then                          00874000
  2026.               do                                                        00875000
  2027.                 tempHiQual='Personal_'||update.group.HiLvlIndx          00876000
  2028.                 if hli.tempHiQual.0='' then                             00877000
  2029.                   do                                                    00878000
  2030.                     hli.tempHiQual='Personal_'||,                       00879000
  2031.                                   update.group.HiLvlIndx||' '           00880000
  2032.                     NewHiQ=NewHiQ||'Personal_'||,                       00881000
  2033.                         update.group.HiLvlIndx||' '                     00882000
  2034.                     hli.tempHiQual.0=1                                  00883000
  2035.                   end                                                   00884000
  2036.                 else                                                    00885000
  2037.                   hli.tempHiQual.0=hli.tempHiQual.0+1                   00886000
  2038.                 tptr=hli.tempHiQual.0                                   00887000
  2039.                 hli.tempHiQual.tptr=group                               00888000
  2040.               end                                                       00889000
  2041.           end                                                           00890000
  2042.       end                                                               00891000
  2043.       hli.HiQual.0=k                                                    00892000
  2044.     end                                                                 00893000
  2045.     if index(word(BldHiQ,1),'New_Groups_Since_')>0 then                 00894000
  2046.       hli.0=word(BldHiQ,1)||' '||strip(NewHiQ)||' '||subword(bldHiQ,2)  00895000
  2047.     else                                                                00896000
  2048.       hli.0=strip(NewHiQ)||' '||bldHiQ                                  00897000
  2049. Return                                                                  00898000
  2050. /*-----------------------------------------------------------------*/   00899000
  2051. /* Routine to handle Unsupported PFK                               */   00900000
  2052. /*-----------------------------------------------------------------*/   00901000
  2053. UnsupportedPFK:                                                         00902000
  2054.    index=index-(scrbot-2)                                               00903000
  2055.    message='Unsupported PFK'                                            00904000
  2056. Return                                                                  00905000
  2057. /**---------------------------------------------------------------**/   00906000
  2058. /** Network News Reader                                           **/   00907000
  2059. /**                             Secondary High Level Index        **/   00908000
  2060. /**---------------------------------------------------------------**/   00909000
  2061. nnr$shli: procedure expose item. update. updateptr original. CHGList.   00910000
  2062. 'Extract /lscreen'                                                      00911000
  2063. Address COMMAND 'GLOBALV SELECT VMNNTP'                                 00912000
  2064. Address COMMAND 'GLOBALV GET VERSION'                                   00913000
  2065. Address COMMAND 'GLOBALV GET NEWNEWS'                                   00914000
  2066. Address COMMAND 'GLOBALV GET SOCKET'                                    00915000
  2067. Address COMMAND 'GLOBALV GET POWER'                                     00916000
  2068. Address COMMAND 'GLOBALV GET IPADDR'                                    00917000
  2069. newcheck.='0'                                                           00918000
  2070. scrbot=lscreen.1-4                                                      00919000
  2071. CHGlist.0='0'                                                           00920000
  2072. do i=1 to item.0                                                        00921000
  2073.   first.i=word(item.i,3)                                                00922000
  2074.   last.i=word(item.i,2)                                                 00923000
  2075.   newcheck.i=word(item.i,5)                                             00924000
  2076.   groupname.i=word(item.i,1)                                            00925000
  2077.   if newcheck.i then                                                    00926000
  2078.     do                                                                  00927000
  2079.       group=groupname.i                                                 00928000
  2080.       parse var update.group.FrstLstLg frst_rem last_rem '$' .          00929000
  2081.       if (verify(last_rem,'0123456789$')=0),                            00930000
  2082.         &(last_rem^='') then                                            00931000
  2083.             num.i=count_log(update.group.FrstLstLg)+(last.i-last_rem)   00932000
  2084.       else                                                              00933000
  2085.         num.i=last.i-first.i                                            00934000
  2086.     end                                                                 00935000
  2087.   else                                                                  00936000
  2088.     num.i=last.i-first.i + 1                                            00937000
  2089.   if num.i<0 | first.i=0 | last.i=0 then                                00938000
  2090.     num.i=0                                                             00939000
  2091.   item.i=left(word(item.i,1),28)||right(num.i,6)||,                     00940000
  2092.          right(word(item.i,4),3)                                        00941000
  2093. end                                                                     00942000
  2094. index=0                                                                 00943000
  2095. row=3;col=2;                                                            00944000
  2096. message = '';                                                           00945000
  2097. flag='SHLI'                                                             00946000
  2098. Address COMMAND 'DESBUF'                                                00947000
  2099. Do Forever;                                                             00948000
  2100.   Call SHLIscreen;                  /* display main menu screen    */   00949000
  2101.   'Read Nochange Tag'                                                   00950000
  2102.   'Extract /cursor'                                                     00951000
  2103.   row = cursor.1; col = cursor.2;                                       00952000
  2104.   num=0                                                                 00953000
  2105.   Do While(Queued()>0)                                                  00954000
  2106.     num=num+1                                                           00955000
  2107.     Parse Pull QueuedLine.num                                           00956000
  2108.   end                                                                   00957000
  2109.   do i=1 to num                                                         00958000
  2110.     Parse var QueuedLine.i key line column string;                      00959000
  2111.     if key = "RES" Then Nop                                             00960000
  2112.     else SaveQueued=QueuedLine.i                                        00961000
  2113.   end                                                                   00962000
  2114.   Parse Var SaveQueued key line column string;                          00963000
  2115.   Select                                                                00964000
  2116.     When key = "ETK" Then Call Cursor                                   00965000
  2117.     When key = "CMD" Then Call SHLI_CommandLine                         00966000
  2118.     When key = "PFK" Then Call SHLI_PFKeys                              00967000
  2119.     otherwise Call AnythingElse                                         00968000
  2120.   End  /* select */                                                     00969000
  2121.   If flag = 'QUIT' Then                                                 00970000
  2122.     Leave;                                                              00971000
  2123. End   /* Do Forever */                                                  00972000
  2124.                                                                         00973000
  2125. Return                                                                  00974000
  2126.                                                                         00975000
  2127.                                                                         00976000
  2128. /*-----------------------------------------------------------------*/   00977000
  2129. /* Routine to display the main menu screen.                        */   00978000
  2130. /*-----------------------------------------------------------------*/   00979000
  2131. SHLIscreen:                         /* set each line of the screen */   00980000
  2132.    'Set Reserved' 1 'noh' '29'x'@               ',                      00981000
  2133.                   center('*** NNR/VM ('||version||') ***',35),          00982000
  2134.                   right('SHLI/Groups',25),                              00983000
  2135.                   '29'x'!'                                              00984000
  2136.    if power='QUIT' then                                                 00985000
  2137.      'Set Reserved' 2 'noh' '29'x'@'||,                                 00986000
  2138.      'Power OFF(Groups='||index+1||'/'||item.0||')'||'29'x'!'           00987000
  2139.    else                                                                 00988000
  2140.      'Set Reserved' 2 'noh' '29'x'@'||,                                 00989000
  2141.      'Power ON(Groups='||item.0||')'||'29'x'!'                          00990000
  2142.    Do scrpos=3 to lscreen.1-4                                           00991000
  2143.    index=index+1                                                        00992000
  2144.    sindex=index+(scrbot-2)                                              00993000
  2145.    if newcheck.index then                                               00994000
  2146.      attrib='29'x'$'                                                    00995000
  2147.    else                                                                 00996000
  2148.      attrib='29'x'*'                                                    00997000
  2149.    if newcheck.sindex then                                              00998000
  2150.      sattrib='29'x'$'                                                   00999000
  2151.    else                                                                 01000000
  2152.      sattrib='29'x'*'                                                   01001000
  2153.    'Set Reserved' scrpos 'noh' attrib||,                                01002000
  2154.                             Left(item.index,37)||,                      01003000
  2155.                             '29'x'^'||'|'||sattrib||,                   01004000
  2156.                             Left(item.sindex,37)||,                     01005000
  2157.                             '29'x'!'                                    01006000
  2158.    End                                                                  01007000
  2159.    'Set Reserved' lscreen.1-3 'noh'                                     01008000
  2160.    if newnews then                                                      01009000
  2161.      do                                                                 01010000
  2162.        'Set Reserved' lscreen.1-2 'high',                               01011000
  2163.                                  ' 1= Help     ',                       01012000
  2164.                                ||'2= Articles ',                        01013000
  2165.                                ||'3= Quit     ',                        01014000
  2166.                                ||' 4= Headers  ',                       01015000
  2167.                                ||' 5= Post     ',                       01016000
  2168.                                ||' 6= Mark    '                         01017000
  2169.        'Set Reserved' lscreen.1-1 'high',                               01018000
  2170.                                  ' 7= Backward ',                       01019000
  2171.                                ||'8= Forward  ',                        01020000
  2172.                                ||'9= Sub/UnS  ',                        01021000
  2173.                                ||'10= UpDtGrp  ',                       01022000
  2174.                                ||'11= U_Prefer ',                       01023000
  2175.                                ||'12= Power   '                         01024000
  2176.      end                                                                01025000
  2177.    else                                                                 01026000
  2178.      do                                                                 01027000
  2179.        'Set Reserved' lscreen.1-2 'high',                               01028000
  2180.                                  ' 1= Help     ',                       01029000
  2181.                                ||'2= Articles ',                        01030000
  2182.                                ||'3= Quit     ',                        01031000
  2183.                                ||' 4= Headers  ',                       01032000
  2184.                                ||' 5= Post     ',                       01033000
  2185.                                ||' 6=         '                         01034000
  2186.        'Set Reserved' lscreen.1-1 'high',                               01035000
  2187.                                  ' 7= Backward ',                       01036000
  2188.                                ||'8= Forward  ',                        01037000
  2189.                                ||'9=          ',                        01038000
  2190.                                ||'10= UpDtGrp  ',                       01039000
  2191.                                ||'11= U_Prefer ',                       01040000
  2192.                                ||'12= Power   '                         01041000
  2193.      end                                                                01042000
  2194.    If message ^= "" Then                                                01043000
  2195.       Do;                                                               01044000
  2196.          'EMSG' message                                                 01045000
  2197.          message = '';                                                  01046000
  2198.       End;                                                              01047000
  2199.    'Cursor screen' row col                                              01048000
  2200. Return;                                                                 01049000
  2201. /*-----------------------------------------------------------------*/   01050000
  2202. /* Routine to pick off the command line.                           */   01051000
  2203. /*-----------------------------------------------------------------*/   01052000
  2204. SHLI_CommandLine:                                                       01053000
  2205.    line=translate(line);                                                01054000
  2206.    If (Abbrev('QQUIT',line,2) | line = 'QUIT') Then                     01055000
  2207.      Do;                                                                01056000
  2208.        Address COMMAND 'DESBUF'                                         01057000
  2209.        flag='QUIT'           /* exit program                */          01058000
  2210.      End;                                                               01059000
  2211.    else If (line = 'SUBSET') Then                                       01060000
  2212.      Call Subset                                                        01061000
  2213.    else If (line = 'UPDATE') Then                                       01062000
  2214.      Call SHLI_Update                                                   01063000
  2215.    else                                                                 01064000
  2216.      do                                                                 01065000
  2217.        message = 'Unsupported command:' line column string;             01066000
  2218.        index=index-(scrbot-2)                                           01067000
  2219.      end                                                                01068000
  2220. Return                                                                  01069000
  2221. /*-----------------------------------------------------------------*/   01070000
  2222. /* Routine to mark a group of articles as being read               */   01071000
  2223. /*-----------------------------------------------------------------*/   01072000
  2224. SHLI_Mark:                                                              01073000
  2225.    if (row <= 2 | row > scrbot) then                                    01074000
  2226.        message='Cursor outside of area'                                 01075000
  2227.    else                                                                 01076000
  2228.      do                                                                 01077000
  2229.        if col<40 then ptr=index-scrbot+row                              01078000
  2230.        else ptr=sindex-scrbot+row                                       01079000
  2231.        if ptr>item.0 then                                               01080000
  2232.          message='Cursor outside of area'                               01081000
  2233.        else                                                             01082000
  2234.          do                                                             01083000
  2235.            if num.ptr=0 then                                            01084000
  2236.              do                                                         01085000
  2237.                message=groupname.ptr||' is already at zero!'            01086000
  2238.                index=index-(scrbot-2)                                   01087000
  2239.                Return                                                   01088000
  2240.              end                                                        01089000
  2241.            newcheck.ptr='1'                                             01090000
  2242.            article_log=last.ptr*1||' '||last.ptr*1||'$'||,              01091000
  2243.                            compress_log('')                             01092000
  2244.            chkgroup=groupname.ptr                                       01093000
  2245.            if update.chkgroup.FrstLstLg='' then                         01094000
  2246.              do                                                         01095000
  2247.                Call Group_Add(chkgroup)                                 01096000
  2248.                CHGlist.0='1'                                            01097000
  2249.                if CHGlist.chkgroup='Delete' then                        01098000
  2250.                  CHGList.chkgroup=''                                    01099000
  2251.                else                                                     01100000
  2252.                  CHGlist.chkgroup='Add'                                 01101000
  2253.              end                                                        01102000
  2254.            else                                                         01103000
  2255.              update.chkgroup.FrstLstLg=article_log                      01104000
  2256.            first.ptr=word(update.chkgroup.FrstLstLg,1)                  01105000
  2257.            num.ptr=0                                                    01106000
  2258.            item.ptr=substr(item.ptr,1,28)||,                            01107000
  2259.                        right(num.ptr,6)||'*'||substr(item.ptr,36,2)     01108000
  2260.            message=groupname.ptr||' MARKed as read!'                    01109000
  2261.          end                                                            01110000
  2262.      end                                                                01111000
  2263.    index=index-(scrbot-2)                                               01112000
  2264. Return                                                                  01113000
  2265. /*-----------------------------------------------------------------*/   01114000
  2266. /* Routine to Reconnect to server.                                 */   01115000
  2267. /*-----------------------------------------------------------------*/   01116000
  2268. SHLI_ReConnect:                                                         01117000
  2269.   nntprc=NEWSQuit()                                                     01118000
  2270.   nntprc=RXTermin()                                                     01119000
  2271.   nntprc=RXInital(ipaddr)                                               01120000
  2272.   if word(nntprc,1)^='200' & word(nntprc,1)^='201' then                 01121000
  2273.     do                                                                  01122000
  2274.       Address COMMAND 'GLOBALV SETL STATUS' nntprc                      01123000
  2275.       Call Exit_QQuit                                                   01124000
  2276.     end                                                                 01125000
  2277.   Address COMMAND 'GLOBALV GET SOCKET'                                  01126000
  2278. Return                                                                  01127000
  2279. /*-----------------------------------------------------------------*/   01128000
  2280. /* Routine to update a group in place                              */   01129000
  2281. /*-----------------------------------------------------------------*/   01130000
  2282. SHLI_Update:                                                            01131000
  2283.    Call SHLI_ReConnect                                                  01132000
  2284.    message='Some/All Group',                                            01133000
  2285.                       'entrys contain updated information!'             01134000
  2286.    do ptr=1 to item.0                                                   01135000
  2287.      if newnews&newcheck.ptr then                                       01136000
  2288.        do                                                               01137000
  2289.          chkgroup=groupname.ptr                                         01138000
  2290.          status=STATUS_Response('GROUP' chkgroup)                       01139000
  2291.          if word(Status,1)='211' then                                   01140000
  2292.            do                                                           01141000
  2293.              parse var update.chkgroup.FrstLstLg frst_rem,              01142000
  2294.                        last_rem '$' log '$*$' .                         01143000
  2295.              parse var status . . frst_act last_act .                   01144000
  2296.              ext_log=''                                                 01145000
  2297.              log=adjust_outlog(adjust_inlog(expand_log(log)))           01146000
  2298.              article_log=frst_rem||' '||last_rem||'$'||,                01147000
  2299.                      compress_log(log)                                  01148000
  2300.              update.chkgroup.FrstLstLg=article_log                      01149000
  2301.              first.ptr=frst_rem                                         01150000
  2302.              last.ptr=last_act                                          01151000
  2303.              num.ptr=count_log(article_log)+(last.ptr-last_rem)         01152000
  2304.              if (num.ptr<0) then                                        01153000
  2305.                num.ptr=0                                                01154000
  2306.              item.ptr=substr(item.ptr,1,28)||,                          01155000
  2307.                 right(num.ptr,6)||' '||substr(item.ptr,36,2)            01156000
  2308.              original.chkgroup=last_act frst_act,                       01157000
  2309.                                word(original.chkgroup,3)                01158000
  2310.            end                                                          01159000
  2311.        end                                                              01160000
  2312.      else                                                               01161000
  2313.        do                                                               01162000
  2314.          status=STATUS_Response('GROUP' groupname.ptr)                  01163000
  2315.          if word(Status,1)='211' then                                   01164000
  2316.            do                                                           01165000
  2317.              parse var status . . frst_act last_act .                   01166000
  2318.              first.ptr=frst_act                                         01167000
  2319.              last.ptr=last_act                                          01168000
  2320.              original.chkgroup=last_act frst_act,                       01169000
  2321.                                word(original.chkgroup,3)                01170000
  2322.            end                                                          01171000
  2323.            num.ptr=last.ptr-first.ptr+1                                 01172000
  2324.            if num.ptr<0 | first.ptr=0 | last.ptr=0 then                 01173000
  2325.              num.ptr=0                                                  01174000
  2326.            item.ptr=substr(item.ptr,1,28)||,                            01175000
  2327.                 right(num.ptr,6)||' '||substr(item.ptr,36,2)            01176000
  2328.        end                                                              01177000
  2329.    end                                                                  01178000
  2330.    index=index-(scrbot-2)                                               01179000
  2331. Return                                                                  01180000
  2332. /*-----------------------------------------------------------------*/   01181000
  2333. /* Routine to update a group in place                              */   01182000
  2334. /*-----------------------------------------------------------------*/   01183000
  2335. SHLI_UpdtGrp:                                                           01184000
  2336.    if (row <= 2 | row > scrbot) then                                    01185000
  2337.        message='Cursor outside of area'                                 01186000
  2338.    else                                                                 01187000
  2339.      do                                                                 01188000
  2340.        if col<40 then ptr=index-scrbot+row                              01189000
  2341.        else ptr=sindex-scrbot+row                                       01190000
  2342.        if ptr>item.0 then                                               01191000
  2343.          message='Cursor outside of area'                               01192000
  2344.        else                                                             01193000
  2345.          do                                                             01194000
  2346.            Call SHLI_ReConnect                                          01195000
  2347.            message=groupname.ptr 'NOT updated!'                         01196000
  2348.            if newnews&newcheck.ptr then                                 01197000
  2349.              do                                                         01198000
  2350.                chkgroup=groupname.ptr                                   01199000
  2351.                status=STATUS_Response('GROUP' chkgroup)                 01200000
  2352.                if word(Status,1)='211' then                             01201000
  2353.                  do                                                     01202000
  2354.                    parse var update.chkgroup.FrstLstLg frst_rem,        01203000
  2355.                              last_rem '$' log '$*$' .                   01204000
  2356.                    parse var status . . frst_act last_act .             01205000
  2357.                    ext_log=''                                           01206000
  2358.                    log=adjust_outlog(adjust_inlog(expand_log(log)))     01207000
  2359.                    article_log=frst_rem||' '||last_rem||'$'||,          01208000
  2360.                            compress_log(log)                            01209000
  2361.                    update.chkgroup.FrstLstLg=article_log                01210000
  2362.                    first.ptr=frst_rem                                   01211000
  2363.                    last.ptr=last_act                                    01212000
  2364.                    num.ptr=count_log(article_log)+(last.ptr-last_rem)   01213000
  2365.                    if num.ptr<0 | first.ptr=0 | last.ptr=0 then         01214000
  2366.                      num.ptr=0                                          01215000
  2367.                    item.ptr=substr(item.ptr,1,28)||,                    01216000
  2368.                       right(num.ptr,6)||' '||substr(item.ptr,36,2)      01217000
  2369.                    message=groupname.ptr 'updated!'                     01218000
  2370.                    original.chkgroup=last_act frst_act,                 01219000
  2371.                                word(original.chkgroup,3)                01220000
  2372.                  end                                                    01221000
  2373.              end                                                        01222000
  2374.            else                                                         01223000
  2375.              do                                                         01224000
  2376.                status=STATUS_Response('GROUP' groupname.ptr)            01225000
  2377.                if word(Status,1)='211' then                             01226000
  2378.                  do                                                     01227000
  2379.                    parse var status . . frst_act last_act .             01228000
  2380.                    first.ptr=frst_act                                   01229000
  2381.                    last.ptr=last_act                                    01230000
  2382.                    original.chkgroup=last_act frst_act,                 01231000
  2383.                                word(original.chkgroup,3)                01232000
  2384.                  end                                                    01233000
  2385.                  num.ptr=last.ptr-first.ptr + 1                         01234000
  2386.                  if num.ptr<0 | first.ptr=0 | last.ptr=0 then           01235000
  2387.                    num.ptr=0                                            01236000
  2388.                  item.ptr=substr(item.ptr,1,28)||,                      01237000
  2389.                       right(num.ptr,6)||' '||substr(item.ptr,36,2)      01238000
  2390.                  message=groupname.ptr 'updated!'                       01239000
  2391.              end                                                        01240000
  2392.          end                                                            01241000
  2393.      end                                                                01242000
  2394.    index=index-(scrbot-2)                                               01243000
  2395. Return                                                                  01244000
  2396. /*-----------------------------------------------------------------*/   01245000
  2397. /* Routine to handle the PFKs key.                                 */   01246000
  2398. /*-----------------------------------------------------------------*/   01247000
  2399. SHLI_PFKeys:                                                            01248000
  2400.    Call PFKmap                                                          01249000
  2401.    If Line=1 then                                                       01250000
  2402.      do                                                                 01251000
  2403.        Call NNR$HELP(1)                                                 01252000
  2404.        index=index-(scrbot-2)                                           01253000
  2405.      end                                                                01254000
  2406.    else If Line=2 then Call Articles                                    01255000
  2407.    else If Line=3 then call Return_Quit                                 01256000
  2408.    else If Line=4 then call Headers                                     01257000
  2409.    else If Line=5 then call SHLI_Post                                   01258000
  2410.    else If Line=6 & newnews then Call SHLI_Mark                         01259000
  2411.    else If Line=7 then call SHLI_Backward                               01260000
  2412.    else If Line=8 then call SHLI_Forward                                01261000
  2413.    else If Line=9 & newnews then Call SubUnsub                          01262000
  2414.    else If Line=10 then Call SHLI_UpdtGrp                               01263000
  2415.    else If Line=11 then                                                 01264000
  2416.      do                                                                 01265000
  2417.        Address COMMAND 'XEDIT USER PREFS S (PROFILE NNR$PREF'           01266000
  2418.        index=index-(scrbot-2)                                           01267000
  2419.      end                                                                01268000
  2420.    else If Line=12 then Call PowerRead('TOGGLE')                        01269000
  2421.    else Call UnsupportedPFK                                             01270000
  2422. Return                                                                  01271000
  2423. /*-----------------------------------------------------------------*/   01272000
  2424. /* Routine to handle PFK Article.                                  */   01273000
  2425. /*-----------------------------------------------------------------*/   01274000
  2426. Articles:                                                               01275000
  2427.    Call PowerRead('SET')                                                01276000
  2428.    MoreGroups='FIRST'                                                   01277000
  2429.    if (row <= 2 | row > scrbot) then                                    01278000
  2430.        message='Cursor outside of area'                                 01279000
  2431.    else                                                                 01280000
  2432.      do                                                                 01281000
  2433.        if col<40 then ptr=index-scrbot+row                              01282000
  2434.        else ptr=sindex-scrbot+row                                       01283000
  2435.        if ptr>item.0 then                                               01284000
  2436.          message='Cursor outside of area'                               01285000
  2437.        else                                                             01286000
  2438.          do                                                             01287000
  2439.            do while(MoreGroups='NEXT',                                  01288000
  2440.                    |MoreGroups='PREV',                                  01289000
  2441.                    |MoreGroups='FIRST')                                 01290000
  2442.              if num.ptr=0 & MoreGroups='FIRST' then                     01291000
  2443.                do                                                       01292000
  2444.                  index=index-(scrbot-2)                                 01293000
  2445.                  Return                                                 01294000
  2446.                end                                                      01295000
  2447.              posting=1                                                  01296000
  2448.              newsflag='0'                                               01297000
  2449.              log=''                                                     01298000
  2450.              if newnews then                                            01299000
  2451.                do                                                       01300000
  2452.                  startnum=first.ptr                                     01301000
  2453.                  if newcheck.ptr then                                   01302000
  2454.                    do                                                   01303000
  2455.                      chkgroup=groupname.ptr                             01304000
  2456.                      parse var update.chkgroup.FrstLstLg frst_rem,      01305000
  2457.                              last_rem '$' log '$*$' .                   01306000
  2458.                      if (frst_rem>=last_rem)&(log='ff'x) then           01307000
  2459.                        newsflag='1'                                     01308000
  2460.                    end                                                  01309000
  2461.                  else                                                   01310000
  2462.                    do                                                   01311000
  2463.                      newcheck.ptr='1'                                   01312000
  2464.                      chkgroup=groupname.ptr                             01313000
  2465.                      frst_rem=first.ptr                                 01314000
  2466.                      last_rem=last.ptr                                  01315000
  2467.                    end                                                  01316000
  2468.                end                                                      01317000
  2469.              else                                                       01318000
  2470.                startnum=0                                               01319000
  2471.              startnum=startnum*1                                        01320000
  2472.              Address COMMAND 'GLOBALV SET ARTICLE' startnum             01321000
  2473.              Address COMMAND 'GLOBALV SET FRST_ACT'                     01322000
  2474.              Address COMMAND 'GLOBALV SET LAST_ACT'                     01323000
  2475.              Address COMMAND 'GLOBALV SET NEXT_ACT'                     01324000
  2476.              do while(posting)                                          01325000
  2477.                Address COMMAND 'GLOBALV GET HEADERS'                    01326000
  2478.                Address COMMAND 'GLOBALV SET POSTING 0'                  01327000
  2479.                Address COMMAND 'GLOBALV GET ARTICLE'                    01328000
  2480.                nntprc=NEWSArti(headers groupname.ptr article newsflag)  01329000
  2481.                if nntprc^=0 then                                        01330000
  2482.                  do                                                     01331000
  2483.                    message='Return from server('||nntprc||')!'          01332000
  2484.                    index=index-(scrbot-2)                               01333000
  2485.                    Return                                               01334000
  2486.                  end                                                    01335000
  2487.                Address COMMAND 'GLOBALV GET POSTING'                    01336000
  2488.                if posting then newsflag='0'                             01337000
  2489.                if posting then                                          01338000
  2490.                  Call POST$MAIL('ARTI')                                 01339000
  2491.              End /* While posting */                                    01340000
  2492.              Address COMMAND 'GLOBALV GET ARTICLE'                      01341000
  2493.              Address COMMAND 'GLOBALV GET LAST_ACT'                     01342000
  2494.              Address COMMAND 'GLOBALV GET FRST_ACT'                     01343000
  2495.              Address COMMAND 'GLOBALV GET NEXT_ACT'                     01344000
  2496.              if next_act^='' then article=next_act                      01345000
  2497.              if article='' then article=frst_act                        01346000
  2498.              frst_act=article                                           01347000
  2499.              first.ptr=article                                          01348000
  2500.              if last_act=0 then                                         01349000
  2501.                do                                                       01350000
  2502.                  article_log='1 0$'||compress_log('')                   01351000
  2503.                  first.ptr=1                                            01352000
  2504.                  last.ptr=0                                             01353000
  2505.                  num.ptr=0                                              01354000
  2506.                  item.ptr=substr(item.ptr,1,28)||,                      01355000
  2507.                     right(num.ptr,6)||'*'||substr(item.ptr,36,2)        01356000
  2508.                end                                                      01357000
  2509.              else if newnews then                                       01358000
  2510.                do                                                       01359000
  2511.                  if last_act='' then                                    01360000
  2512.                    last_act=last_rem                                    01361000
  2513.                  if log^='' then                                        01362000
  2514.                    log=expand_log(log)                                  01363000
  2515.                  log=adjust_inlog(log)                                  01364000
  2516.                  ext_log=''                                             01365000
  2517.                  log=adjust_outlog(log)                                 01366000
  2518.                  if next_act='' then                                    01367000
  2519.                    do                                                   01368000
  2520.                      article_log=last_act||' '||last_act||'$'||,        01369000
  2521.                            compress_log('')                             01370000
  2522.                      first.ptr=last_act                                 01371000
  2523.                    end                                                  01372000
  2524.                  else                                                   01373000
  2525.                    do                                                   01374000
  2526.                      article_log=frst_rem||' '||last_rem||'$'||,        01375000
  2527.                            compress_log(log)                            01376000
  2528.                      first.ptr=frst_rem                                 01377000
  2529.                    end                                                  01378000
  2530.                  if update.chkgroup.FrstLstLg='' then                   01379000
  2531.                    do                                                   01380000
  2532.                      Call Group_Add(chkgroup)                           01381000
  2533.                      CHGlist.0='1'                                      01382000
  2534.                      if CHGlist.chkgroup='Delete' then                  01383000
  2535.                        CHGList.chkgroup=''                              01384000
  2536.                      else                                               01385000
  2537.                        CHGlist.chkgroup='Add'                           01386000
  2538.                    end                                                  01387000
  2539.                  else                                                   01388000
  2540.                    update.chkgroup.FrstLstLg=article_log                01389000
  2541.                  num.ptr=count_log(article_log)+(last.ptr-last_rem)     01390000
  2542.                  if num.ptr<0 | first.ptr=0 | last.ptr=0 then           01391000
  2543.                    num.ptr=0                                            01392000
  2544.                end                                                      01393000
  2545.              item.ptr=substr(item.ptr,1,28)||,                          01394000
  2546.                     right(num.ptr,6)||'*'||substr(item.ptr,36,2)        01395000
  2547.              Address COMMAND 'GLOBALV GET MOREGROUPS'                   01396000
  2548.              if MoreGroups='NEXT' then                                  01397000
  2549.                ptr=ptr+1                                                01398000
  2550.              else if MoreGroups='PREV' then                             01399000
  2551.                ptr=ptr-1                                                01400000
  2552.              if ptr>item.0 | ptr<1 then                                 01401000
  2553.                MoreGroups='QUIT'                                        01402000
  2554.            End /* While more groups */                                  01403000
  2555.          End                                                            01404000
  2556.      End                                                                01405000
  2557.    index=index-(scrbot-2)                                               01406000
  2558. Return                                                                  01407000
  2559. /*-----------------------------------------------------------------*/   01408000
  2560. /* Routine to handle PFK Quit.                                     */   01409000
  2561. /*-----------------------------------------------------------------*/   01410000
  2562. Return_Quit:                                                            01411000
  2563.   Address COMMAND 'DESBUF'                                              01412000
  2564.   flag='QUIT'                                                           01413000
  2565. Return                                                                  01414000
  2566. /*-----------------------------------------------------------------*/   01415000
  2567. /* Routine to PowerRead PFK.                                       */   01416000
  2568. /*-----------------------------------------------------------------*/   01417000
  2569. PowerRead:                                                              01418000
  2570.   arg which                                                             01419000
  2571.   if which='TOGGLE' then                                                01420000
  2572.     do                                                                  01421000
  2573.       if power='QUIT' then power='NEXT'                                 01422000
  2574.       else if power='NEXT' then power='QUIT'                            01423000
  2575.       else if power='PREV' then power='QUIT'                            01424000
  2576.       else message 'Power setting unknown "'power'"!.'                  01425000
  2577.       Address COMMAND 'GLOBALV SETL POWER' power                        01426000
  2578.       index=index-(scrbot-2)                                            01427000
  2579.     end                                                                 01428000
  2580.   Address COMMAND 'GLOBALV SETL MOREGROUPS' power                       01429000
  2581. Return                                                                  01430000
  2582. /*-----------------------------------------------------------------*/   01431000
  2583. /* Routine to handle PFK Subscribe/UnSubscribe                     */   01432000
  2584. /*-----------------------------------------------------------------*/   01433000
  2585. SubUnsub:                                                               01434000
  2586. Address COMMAND 'GLOBALV GET CURRHLIQ'                                  01435000
  2587.    if (row <= 2 | row > scrbot) then                                    01436000
  2588.        message='Cursor outside of area'                                 01437000
  2589.    else                                                                 01438000
  2590.      do                                                                 01439000
  2591.        if col<40 then ptr=index-scrbot+row                              01440000
  2592.        else ptr=sindex-scrbot+row                                       01441000
  2593.        if ptr>item.0 then                                               01442000
  2594.          message='Cursor outside of area'                               01443000
  2595.        else                                                             01444000
  2596.          do                                                             01445000
  2597.            if newcheck.ptr then                                         01446000
  2598.              do                                                         01447000
  2599.                message='You have unsubscribed from' groupname.ptr       01448000
  2600.                newcheck.ptr='0'                                         01449000
  2601.                chkgroup=groupname.ptr                                   01450000
  2602.                if update.chkgroup.FrstLstLg^='' then                    01451000
  2603.                  do                                                     01452000
  2604.                    Call Group_Delete(chkgroup)                          01453000
  2605.                    CHGlist.0='1'                                        01454000
  2606.                    CHGlist.chkgroup='Delete'                            01455000
  2607.                  end                                                    01456000
  2608.                else                                                     01457000
  2609.                  message='unsubscribe operation failure'                01458000
  2610.              end                                                        01459000
  2611.            else                                                         01460000
  2612.              do                                                         01461000
  2613.                message='You have subscribed to' groupname.ptr           01462000
  2614.                newcheck.ptr='1'                                         01463000
  2615.                article_log=first.ptr*1||' '||last.ptr*1||'$'||,         01464000
  2616.                compress_log(copies('0',max(0,last.ptr-first.ptr+1)))    01465000
  2617.                chkgroup=groupname.ptr                                   01466000
  2618.                if update.chkgroup.FrstLstLg='' then                     01467000
  2619.                  do                                                     01468000
  2620.                    Call Group_Add(chkgroup)                             01469000
  2621.                    if translate(currhliq)='OFF' then                    01470000
  2622.                      update.chkgroup.HiLvlIndx=''                       01471000
  2623.                    else                                                 01472000
  2624.                      update.chkgroup.HiLvlIndx=currhliq                 01473000
  2625.                    CHGlist.0='1'                                        01474000
  2626.                    if CHGlist.chkgroup='Delete' then                    01475000
  2627.                      CHGList.chkgroup=''                                01476000
  2628.                    else                                                 01477000
  2629.                      CHGlist.chkgroup='Add'                             01478000
  2630.                  end                                                    01479000
  2631.                else                                                     01480000
  2632.                  message='subscribe operation failure'                  01481000
  2633.              end                                                        01482000
  2634.          end                                                            01483000
  2635.      end                                                                01484000
  2636.    index=index-(scrbot-2)                                               01485000
  2637. Return                                                                  01486000
  2638. /*-----------------------------------------------------------------*/   01487000
  2639. /* Routine to handle PFK Headers.                                  */   01488000
  2640. /*-----------------------------------------------------------------*/   01489000
  2641. Headers:                                                                01490000
  2642.    MoreGroups='FIRST'                                                   01491000
  2643.    if (row <= 2 | row > scrbot) then                                    01492000
  2644.        message='Cursor outside of area'                                 01493000
  2645.    else                                                                 01494000
  2646.      do                                                                 01495000
  2647.        if col<40 then ptr=index-scrbot+row                              01496000
  2648.        else ptr=sindex-scrbot+row                                       01497000
  2649.        if ptr>item.0 then                                               01498000
  2650.          message='Cursor outside of area'                               01499000
  2651.        else                                                             01500000
  2652.          do                                                             01501000
  2653.            do while(MoreGroups='NEXT',                                  01502000
  2654.                    |MoreGroups='PREV',                                  01503000
  2655.                    |MoreGroups='FIRST')                                 01504000
  2656.              if num.ptr=0 & MoreGroups='FIRST' then                     01505000
  2657.                do                                                       01506000
  2658.                  index=index-(scrbot-2)                                 01507000
  2659.                  Return                                                 01508000
  2660.                end                                                      01509000
  2661.              MoreGroups='QUIT'                                          01510000
  2662.              Address COMMAND 'GLOBALV SET THREAD 0'                     01511000
  2663.              Address COMMAND 'GLOBALV SET REDUCE 0'                     01512000
  2664.              Address COMMAND 'GLOBALV SET REDUCECNT 0'                  01513000
  2665.              Address COMMAND 'GLOBALV GET NUMBER'                       01514000
  2666.              Address COMMAND 'GLOBALV SET ARTICLE'                      01515000
  2667.              newsflag='0'                                               01516000
  2668.              if newnews then                                            01517000
  2669.                do                                                       01518000
  2670.                  startnum=first.ptr                                     01519000
  2671.                  if newcheck.ptr then                                   01520000
  2672.                    do                                                   01521000
  2673.                      chkgroup=groupname.ptr                             01522000
  2674.                      parse var update.chkgroup.FrstLstLg frst_rem,      01523000
  2675.                             last_rem '$' log '$*$' .                    01524000
  2676.                      if (frst_rem>=last_rem)&(log='ff'x) then           01525000
  2677.                        newsflag='1'                                     01526000
  2678.                    end                                                  01527000
  2679.                end                                                      01528000
  2680.              else                                                       01529000
  2681.                startnum=0                                               01530000
  2682.              nntprc=NEWSXHDR(number startnum groupname.ptr newsflag)    01531000
  2683.              if nntprc^=0 then                                          01532000
  2684.                do                                                       01533000
  2685.                  message='Return from server ('||nntprc||')!'           01534000
  2686.                  index=index-(scrbot-2)                                 01535000
  2687.                  Return                                                 01536000
  2688.                end                                                      01537000
  2689.              group=groupname.ptr                                        01538000
  2690.              article_log=NNR$XHDR(group||' '||update.group.FrstLstLg)   01539000
  2691.              if newnews&article_log<>'' then                            01540000
  2692.                do                                                       01541000
  2693.                  newcheck.ptr='1'                                       01542000
  2694.                  parse var article_log frst_rem last_rem '$' .          01543000
  2695.                  if update.group.FrstLstLg='' then                      01544000
  2696.                    do                                                   01545000
  2697.                      Call Group_Add(group)                              01546000
  2698.                      CHGlist.0='1'                                      01547000
  2699.                      if CHGlist.group='Delete' then                     01548000
  2700.                        CHGList.group=''                                 01549000
  2701.                      else                                               01550000
  2702.                        CHGlist.group='Add'                              01551000
  2703.                    end                                                  01552000
  2704.                  else                                                   01553000
  2705.                    update.group.FrstLstLg=article_log                   01554000
  2706.                  first.ptr=word(update.group.FrstLstLg,1)               01555000
  2707.                  num.ptr=count_log(article_log)+(last.ptr-last_rem)     01556000
  2708.                  if num.ptr<0 | first.ptr=0 | last.ptr=0 then           01557000
  2709.                    num.ptr=0                                            01558000
  2710.                end                                                      01559000
  2711.              item.ptr=substr(item.ptr,1,28)||right(num.ptr,6)||'*'||,   01560000
  2712.                    substr(item.ptr,36,2)                                01561000
  2713.              Address COMMAND 'GLOBALV GET MOREGROUPS'                   01562000
  2714.              if MoreGroups='NEXT' then                                  01563000
  2715.                ptr=ptr+1                                                01564000
  2716.              else if MoreGroups='PREV' then                             01565000
  2717.                ptr=ptr-1                                                01566000
  2718.              if ptr>item.0 | ptr<1 then                                 01567000
  2719.                MoreGroups='QUIT'                                        01568000
  2720.            End /* while */                                              01569000
  2721.          End                                                            01570000
  2722.      End                                                                01571000
  2723.    index=index-(scrbot-2)                                               01572000
  2724. Return                                                                  01573000
  2725. /*-----------------------------------------------------------------*/   01574000
  2726. /* Routine to handle PFK Posting.                                  */   01575000
  2727. /*-----------------------------------------------------------------*/   01576000
  2728. SHLI_Post:                                                              01577000
  2729.    if (row <= 2 | row > scrbot) then                                    01578000
  2730.        message='Cursor outside of area'                                 01579000
  2731.    else                                                                 01580000
  2732.      do                                                                 01581000
  2733.        if col<40 then ptr=index-scrbot+row                              01582000
  2734.        else ptr=sindex-scrbot+row                                       01583000
  2735.        if ptr>item.0 then                                               01584000
  2736.          message='Cursor outside of area'                               01585000
  2737.        else                                                             01586000
  2738.          do                                                             01587000
  2739.           Address COMMAND 'GLOBALV SETL NEWSGROUP '||,                  01588000
  2740.                            groupname.ptr                                01589000
  2741.           Call POST$MAIL('SHLI')                                        01590000
  2742.          end                                                            01591000
  2743.      end                                                                01592000
  2744.    index=index-(scrbot-2)                                               01593000
  2745. Return                                                                  01594000
  2746. /*-----------------------------------------------------------------*/   01595000
  2747. /* Routine to handle PFK Backward.                                 */   01596000
  2748. /*-----------------------------------------------------------------*/   01597000
  2749. SHLI_Backward:                                                          01598000
  2750.    row=3;col=2;                                                         01599000
  2751.    if index-(scrbot*3-6) > 1 then                                       01600000
  2752.      index=index-(scrbot*3-6)                                           01601000
  2753.    else                                                                 01602000
  2754.      Do                                                                 01603000
  2755.        message='Reached Top of File'                                    01604000
  2756.        index=0                                                          01605000
  2757.      End                                                                01606000
  2758. Return                                                                  01607000
  2759. /*-----------------------------------------------------------------*/   01608000
  2760. /* Routine to handle PFK Forward.                                  */   01609000
  2761. /*-----------------------------------------------------------------*/   01610000
  2762. SHLI_Forward:                                                           01611000
  2763.    row=3;col=2;                                                         01612000
  2764.    If index+(scrbot*2-4) < item.0+scrbot-2 then                         01613000
  2765.      index=index+(scrbot-2)                                             01614000
  2766.    else                                                                 01615000
  2767.      Do                                                                 01616000
  2768.        message='Reached End of File'                                    01617000
  2769.        index=index-(scrbot-2)                                           01618000
  2770.      End                                                                01619000
  2771. Return                                                                  01620000
  2772. /**---------------------------------------------------------------**/   01621000
  2773. /** Network News Reader                                           **/   01622000
  2774. /**                                                  Headers      **/   01623000
  2775. /**---------------------------------------------------------------**/   01624000
  2776. NNR$XHDR: Procedure                                                     01625000
  2777. parse arg article_log                                                   01626000
  2778. 'Extract /lscreen'                                                      01627000
  2779. 'SET LINEND OFF'                                                        01628000
  2780. 'SET PF04 ONLY dummy'                                                   01629000
  2781. 'SET PF16 ONLY dummy'                                                   01630000
  2782. Address COMMAND 'GLOBALV SELECT VMNNTP'                                 01631000
  2783. Address COMMAND 'GLOBALV GET VERSION'                                   01632000
  2784. Address COMMAND 'GLOBALV GET NEWNEWS'                                   01633000
  2785. Address COMMAND 'GLOBALV GET SOCKET'                                    01634000
  2786. Address COMMAND 'GLOBALV GET THREAD'                                    01635000
  2787. Address COMMAND 'GLOBALV GET REDUCE'                                    01636000
  2788. Address COMMAND 'GLOBALV GET REDUCECNT'                                 01637000
  2789. /*-----------------------------------------------------------------*/   01638000
  2790. /* Driver routine for the main menu screen.                        */   01639000
  2791. /*-----------------------------------------------------------------*/   01640000
  2792. save_article=''                                                         01641000
  2793. item.=''                                                                01642000
  2794. count=0                                                                 01643000
  2795. prfx.=''                                                                01644000
  2796. Ext_Log=''                                                              01645000
  2797. if queued()>0 then parse pull group frst_act last_act                   01646000
  2798. else                                                                    01647000
  2799.  do                                                                     01648000
  2800.   Address COMMAND 'DESBUF'                                              01649000
  2801.   Return('')                                                            01650000
  2802.  end                                                                    01651000
  2803. i=1                                                                     01652000
  2804. parse pull item.i                                                       01653000
  2805. do while (item.i^='.')                                                  01654000
  2806.   i=i+1                                                                 01655000
  2807.   parse pull item.i                                                     01656000
  2808. end                                                                     01657000
  2809. if i=1 then                                                             01658000
  2810.   do                                                                    01659000
  2811.     Address COMMAND 'DESBUF'                                            01660000
  2812.     Return('')                                                          01661000
  2813.   end                                                                   01662000
  2814. item.i=''                                                               01663000
  2815. item.0=i-1                                                              01664000
  2816. prfx.0=i-1                                                              01665000
  2817. if ^thread&^reduce then                                                 01666000
  2818.   do                                                                    01667000
  2819.     parse var article_log log_grp frst_rem last_rem '$' log '$*$' .     01668000
  2820.     if log^='' then                                                     01669000
  2821.       log=expand_log(log)                                               01670000
  2822.     log=adjust_inlog(log)                                               01671000
  2823.     ext_log=adjust_inlog(ext_log)                                       01672000
  2824.     do j=1 to item.0                                                    01673000
  2825.        parse var item.j article .                                /*stk*/01674000
  2826.        if Map_Log(article) then                                         01675000
  2827.          prfx.j='*'                                                     01676000
  2828.        else                                                             01677000
  2829.          prfx.j='.'                                                     01678000
  2830.      end                                                                01679000
  2831.   end                                                                   01680000
  2832. else                                                                    01681000
  2833.   do                                                                    01682000
  2834.     log=copies('0',item.0)                                              01683000
  2835.     ext_log=copies('1',item.0)                                          01684000
  2836.     do i=1 to item.0                                                    01685000
  2837.        prfx.i=substr(item.i,1,1)                                        01686000
  2838.        item.i=substr(item.i,2)                                          01687000
  2839.     end                                                                 01688000
  2840.   end                                                                   01689000
  2841. scrbot=lscreen.1-4                                                      01690000
  2842. CMDline='0'                                                             01691000
  2843. index=0                                                                 01692000
  2844. row=3;col=1                                                      /*stk*/01693000
  2845. flag = 'XHDR';                                                          01694000
  2846. message = '';                                                           01695000
  2847. Selected_Articles.=''                                                   01696000
  2848. Address COMMAND 'DESBUF'                                                01697000
  2849. Do Forever;                                                             01698000
  2850.   Call XHDRscreen;                  /* display main menu screen    */   01699000
  2851.   'Read Nochange Tag'                                                   01700000
  2852.   'Extract /cursor'                                                     01701000
  2853.   row = cursor.1; col = cursor.2;                                       01702000
  2854.   num=0                                                                 01703000
  2855.   Do While(Queued()>0)                                                  01704000
  2856.     num=num+1                                                           01705000
  2857.     Parse Pull QueuedLine.num                                           01706000
  2858.   end                                                                   01707000
  2859.   do i=1 to num                                                         01708000
  2860.     Parse var QueuedLine.i key line column string;                      01709000
  2861.     if key = "RES" Then Call XHDR_Reserved                              01710000
  2862.     else SaveQueued=QueuedLine.i                                        01711000
  2863.   end                                                                   01712000
  2864.   Parse Var SaveQueued key line column string;                          01713000
  2865.   Select                                                                01714000
  2866.     When key = "ETK" Then Call Cursor                                   01715000
  2867.     When key = "CMD" Then Call XHDR_CommandLine                         01716000
  2868.     When key = "PFK" Then Call XHDR_PFKeys                              01717000
  2869.     otherwise Call AnythingElse                                         01718000
  2870.   End                                                                   01719000
  2871.   If flag = 'QUIT' Then                                                 01720000
  2872.     do                                                                  01721000
  2873.       if thread | reduce then                                           01722000
  2874.         do                                                              01723000
  2875.           log=BldNewLog(log)                                            01724000
  2876.           article_log=log                                               01725000
  2877.         end                                                             01726000
  2878.       if ^thread&^reduce&newnews then                                   01727000
  2879.         do                                                              01728000
  2880.           log=BldNewLog(log)                                            01729000
  2881.           if index(log,'1')>0 then                                      01730000
  2882.             do                                                          01731000
  2883.               log=Adjust_OutLog(log)                                    01732000
  2884.               log=Compress_log(log)                                     01733000
  2885.               article_log=frst_rem||' '||last_rem||'$'||log             01734000
  2886.             end                                                         01735000
  2887.           else                                                          01736000
  2888.             article_log=''                                              01737000
  2889.         end                                                             01738000
  2890.       Leave                                                             01739000
  2891.     end                                                                 01740000
  2892. End                                                                     01741000
  2893. Return(article_log)                                                     01742000
  2894. /*-----------------------------------------------------------------*/   01743000
  2895. /* Routine to display the main menu screen.                        */   01744000
  2896. /*-----------------------------------------------------------------*/   01745000
  2897. XHDRscreen:                         /* set each line of the screen */   01746000
  2898.    reduced=left('R '||reducecnt,5)                                      01747000
  2899.    'Set Reserved' 1 'noh' '29'x'@'||reduced||left(' ',10),              01748000
  2900.                   center('*** NNR/VM ('||version||') ***',35),          01749000
  2901.                   right('Headers',25),                                  01750000
  2902.                   '29'x'!                    '                          01751000
  2903.    'Set Reserved' 2 'noh' '29'x'@'||group||,                            01752000
  2904.                ' (Articles='||index+1||'/'||item.0||')'||'29'x'!'       01753000
  2905.    Do scrpos=3 to lscreen.1-4                                           01754000
  2906.    index=index+1                                                        01755000
  2907.    parse value item.index with iart IFrom '4a'x ISubj            /*stk*/01756000
  2908.    if col=1 then col = length(IFrom) + 3                         /*stk*/01757000
  2909.    if iart<>'' then IFrom = ,                                    /*stk*/01758000
  2910.        IFrom||'29'x'$'||left(prfx.index,1)||'29'x'!'||ISubj      /*stk*/01759000
  2911.    'Set Reserved' scrpos 'noh' '29'x'!'IFrom                     /*stk*/01760000
  2912.    End                                                                  01761000
  2913.    'Set Reserved' lscreen.1-3 'noh'                                     01762000
  2914.    if newnews then                                                      01763000
  2915.      do                                                                 01764000
  2916.        'Set Reserved' lscreen.1-2 'high',                               01765000
  2917.                                  ' 1= Help     ',                       01766000
  2918.                                ||'2= Article  ',                        01767000
  2919.                                ||'3= Quit     ',                        01768000
  2920.                                ||' 4= Selected ',                       01769000
  2921.                                ||' 5= Post     ',                       01770000
  2922.                                ||' 6= Mrk2Here'                         01771000
  2923.        'Set Reserved' lscreen.1-1 'high',                               01772000
  2924.                                  ' 7= Backward ',                       01773000
  2925.                                ||'8= Forward  ',                        01774000
  2926.                                ||'9= Thread   ',                        01775000
  2927.                                ||'10= Reduce   ',                       01776000
  2928.                                ||'11= Mrk/UMrk ',                       01777000
  2929.                                ||'12= NxtGroup'                         01778000
  2930.      end                                                                01779000
  2931.    else                                                                 01780000
  2932.      do                                                                 01781000
  2933.        'Set Reserved' lscreen.1-2 'high',                               01782000
  2934.                                  ' 1= Help     ',                       01783000
  2935.                                ||'2= Article  ',                        01784000
  2936.                                ||'3= Quit     ',                        01785000
  2937.                                ||' 4= Selected ',                       01786000
  2938.                                ||' 5= Post     ',                       01787000
  2939.                                ||' 6=         '                         01788000
  2940.        'Set Reserved' lscreen.1-1 'high',                               01789000
  2941.                                  ' 7= Backward ',                       01790000
  2942.                                ||'8= Forward  ',                        01791000
  2943.                                ||'9= Thread   ',                        01792000
  2944.                                ||'10= Reduce   ',                       01793000
  2945.                                ||'11=          ',                       01794000
  2946.                                ||'12= NxtGroup'                         01795000
  2947.      end                                                                01796000
  2948.    If message ^= "" Then                                                01797000
  2949.       Do;                                                               01798000
  2950.          'EMSG' message                                                 01799000
  2951.          message = '';                                                  01800000
  2952.       End;                                                              01801000
  2953.    'Cursor screen' row col                                              01802000
  2954. Return;                                                                 01803000
  2955. /*-----------------------------------------------------------------*/   01804000
  2956. /* Routine to pick off the command line.                           */   01805000
  2957. /*-----------------------------------------------------------------*/   01806000
  2958. XHDR_CommandLine:                                                       01807000
  2959.    line=translate(line);                                                01808000
  2960.    If (Abbrev('QQUIT',line,2) | line = 'QUIT') Then                     01809000
  2961.      Call WhichGroup('QUIT')                                            01810000
  2962.    Else If Abbrev('NGROUP',line,2)  Then                                01811000
  2963.      Call WhichGroup('NEXT')                                            01812000
  2964.    Else If Abbrev('PGROUP',line,2)  Then                                01813000
  2965.      Call WhichGroup('PREV')                                            01814000
  2966.    Else If (Abbrev('THREAD',line,3)) Then                               01815000
  2967.      Do                                                                 01816000
  2968.        CMDline='1'                                                      01817000
  2969.        line=line||' '||translate(column||' '||string)                   01818000
  2970.        Call Thread                                                      01819000
  2971.        CMDline='0'                                                      01820000
  2972.      End                                                                01821000
  2973.    else If (line = 'SUBSET') Then                                       01822000
  2974.        Call Subset                                                      01823000
  2975.    else                                                                 01824000
  2976.      Do                                                                 01825000
  2977.        message = 'Unsupported command:' line column string;             01826000
  2978.        index=index-(scrbot-2)                                           01827000
  2979.      End                                                                01828000
  2980. Return                                                                  01829000
  2981. /*-----------------------------------------------------------------*/   01830000
  2982. /* Routine to collect reserved lines.                              */   01831000
  2983. /*-----------------------------------------------------------------*/   01832000
  2984. XHDR_Reserved:                                                          01833000
  2985.   if ((line > 2)&(line < (scrbot+1))) Then                              01834000
  2986.     do                                                                  01835000
  2987.       ptr=index-scrbot+line                                             01836000
  2988.       prfx.ptr=string                                                   01837000
  2989.       count=count+1                                                     01838000
  2990.       Selected_Articles.count=word(item.ptr,1)||' '||ptr                01839000
  2991.     end                                                                 01840000
  2992.   else                                                                  01841000
  2993.     do                                                                  01842000
  2994.       message='Some articles selected are out of bounds!'               01843000
  2995.     end                                                                 01844000
  2996. Return                                                                  01845000
  2997. /*-----------------------------------------------------------------*/   01846000
  2998. /* Routine to handle the PFKs key.                                 */   01847000
  2999. /*-----------------------------------------------------------------*/   01848000
  3000. XHDR_PFKeys:                                                            01849000
  3001.    Call PFKmap                                                          01850000
  3002.    If Line=1 then                                                       01851000
  3003.      do                                                                 01852000
  3004.        Call NNR$HELP(2)                                                 01853000
  3005.        index=index-(scrbot-2)                                           01854000
  3006.      end                                                                01855000
  3007.    else If Line=2 then Call TArticle                                    01856000
  3008.    else If Line=3 then call WhichGroup('QUIT')                          01857000
  3009.    else If Line=4 then call Selected_Articles                           01858000
  3010.    else If Line=5 then call XHDR_Post                                   01859000
  3011.    else If Line=6 & newnews then call XHDR_Mark                         01860000
  3012.    else If Line=7 then call XHDR_Backward                               01861000
  3013.    else If Line=8 then call XHDR_Forward                                01862000
  3014.    else If Line=9 then call Thread                                      01863000
  3015.    else If Line=10 then call Reduce                                     01864000
  3016.    else If Line=11 & newnews then call MrkUnmrk                         01865000
  3017.    else If Line=12 then call WhichGroup('NEXT')                         01866000
  3018.    else Call UnsupportedPFK                                             01867000
  3019. Return                                                                  01868000
  3020. /*-----------------------------------------------------------------*/   01869000
  3021. /* Routine to handle the PFKs key.                                 */   01870000
  3022. /*-----------------------------------------------------------------*/   01871000
  3023. WhichGroup:                                                             01872000
  3024.   arg which                                                             01873000
  3025.   Address COMMAND 'GLOBALV SETL MOREGROUPS' which                       01874000
  3026.   Address COMMAND 'DESBUF'                                              01875000
  3027.   flag='QUIT'                                                           01876000
  3028. Return                                                                  01877000
  3029. /*-----------------------------------------------------------------*/   01878000
  3030. /* Routine to handle PFK Article.                                  */   01879000
  3031. /*-----------------------------------------------------------------*/   01880000
  3032. TArticle:                                                               01881000
  3033.   Address COMMAND 'GLOBALV GET MOREGROUPS'                              01882000
  3034.   Address COMMAND 'GLOBALV SETL MOREGROUPS QUIT'                        01883000
  3035.   if (row <= 2 | row > scrbot) then                                     01884000
  3036.       message='Cursor outside of area'                                  01885000
  3037.   else                                                                  01886000
  3038.     do                                                                  01887000
  3039.       ptr=index-scrbot+row                                              01888000
  3040.       if ptr>item.0 then                                                01889000
  3041.         message='Cursor outside of area'                                01890000
  3042.       else                                                              01891000
  3043.         do                                                              01892000
  3044.           posting=1                                                     01893000
  3045.           Address COMMAND 'GLOBALV SET LARTICLE 0'                      01894000
  3046.           Address COMMAND 'GLOBALV SET FARTICLE 0'                      01895000
  3047.           Address COMMAND 'GLOBALV SETL NEWSGROUP' group                01896000
  3048.           Address COMMAND 'GLOBALV SET ARTICLE '||,                     01897000
  3049.                         word(item.ptr,1)                                01898000
  3050.           do while(posting)                                             01899000
  3051.             Address COMMAND 'GLOBALV GET HEADERS'                       01900000
  3052.             Address COMMAND 'GLOBALV GET ARTICLE'                       01901000
  3053.             Address COMMAND 'GLOBALV SET POSTING 0'                     01902000
  3054.             nntprc=NEWSSeleI(headers group article 0)                   01903000
  3055.             if nntprc^=0 then                                           01904000
  3056.               do                                                        01905000
  3057.                 message=nntprc                                          01906000
  3058.                  index=index-(scrbot-2)                                 01907000
  3059.                 Return                                                  01908000
  3060.               end                                                       01909000
  3061.             Address COMMAND 'GLOBALV GET POSTING'                       01910000
  3062.             if posting then                                             01911000
  3063.               Call POST$MAIL('ARTI')                                    01912000
  3064.           End                                                           01913000
  3065.           Address COMMAND 'GLOBALV GET FARTICLE'                        01914000
  3066.           Address COMMAND 'GLOBALV GET LARTICLE'                        01915000
  3067.           do i=FArticle to LArticle                                     01916000
  3068.             prfx.i='*'                                                  01917000
  3069.           End                                                           01918000
  3070.         End                                                             01919000
  3071.     End                                                                 01920000
  3072.   index=index-(scrbot-2)                                                01921000
  3073.   Address COMMAND 'GLOBALV GET MOREGROUPS'                              01922000
  3074.   if moregroups^='QUIT' then Call WhichGroup(moregroups)                01923000
  3075. Return                                                                  01924000
  3076. /*-----------------------------------------------------------------*/   01925000
  3077. /* Routine to handle Mark article.                                 */   01926000
  3078. /*-----------------------------------------------------------------*/   01927000
  3079. XHDR_Mark:                                                              01928000
  3080.   if row=lscreen.1 then                                                 01929000
  3081.     do                                                                  01930000
  3082.       do i=1 to item.0                                                  01931000
  3083.         prfx.i='*'                                                      01932000
  3084.       end                                                               01933000
  3085.       message='All UnRead articles were Marked!'                        01934000
  3086.     end                                                                 01935000
  3087.   else if (row <= 2 | row > scrbot) then                                01936000
  3088.       message='Cursor outside of area'                                  01937000
  3089.   else                                                                  01938000
  3090.     do                                                                  01939000
  3091.       ptr=index-scrbot+row                                              01940000
  3092.       if ptr>item.0 then                                                01941000
  3093.         message='Cursor outside of area'                                01942000
  3094.       else                                                              01943000
  3095.         do                                                              01944000
  3096.           do i=1 to ptr                                                 01945000
  3097.             prfx.i='*'                                                  01946000
  3098.           end                                                           01947000
  3099.           message='Unread Articles from' word(item.1,1) 'to',           01948000
  3100.                        word(item.ptr,1) 'MARKed!'                       01949000
  3101.         end                                                             01950000
  3102.     end                                                                 01951000
  3103.   index=index-(scrbot-2)                                                01952000
  3104. Return                                                                  01953000
  3105. /*-----------------------------------------------------------------*/   01954000
  3106. /* Routine to handle Mark/UnMark.                                  */   01955000
  3107. /*-----------------------------------------------------------------*/   01956000
  3108. MrkUNMrk:                                                               01957000
  3109.   if (row <= 2 | row > scrbot) then                                     01958000
  3110.       message='Cursor outside of area'                                  01959000
  3111.   else                                                                  01960000
  3112.     do                                                                  01961000
  3113.       ptr=index-scrbot+row                                              01962000
  3114.       if ptr>item.0 then                                                01963000
  3115.         message='Cursor outside of area'                                01964000
  3116.       else                                                              01965000
  3117.         do                                                              01966000
  3118.           if prfx.ptr='*' then                                          01967000
  3119.             do                                                          01968000
  3120.               prfx.ptr='.'                                              01969000
  3121.               message='Article' word(item.ptr,1) 'UnMarked!'            01970000
  3122.             end                                                         01971000
  3123.           else                                                          01972000
  3124.             do                                                          01973000
  3125.               prfx.ptr='*'                                              01974000
  3126.               message='Article' word(item.ptr,1) 'Marked!'              01975000
  3127.             end                                                         01976000
  3128.         end                                                             01977000
  3129.     end                                                                 01978000
  3130.   index=index-(scrbot-2)                                                01979000
  3131. Return                                                                  01980000
  3132. /*-----------------------------------------------------------------*/   01981000
  3133. /* Routine to handle PFK Selected_Artcicles.                       */   01982000
  3134. /*-----------------------------------------------------------------*/   01983000
  3135. Selected_Articles:                                                      01984000
  3136.   Address COMMAND 'GLOBALV GET MOREGROUPS'                              01985000
  3137.   Address COMMAND 'GLOBALV SETL MOREGROUPS QUIT'                        01986000
  3138.   if Selected_Articles.1='' then                                        01987000
  3139.     do                                                                  01988000
  3140.       message='There were *no* "Selected Articles"!'                    01989000
  3141.       index=index-(scrbot-2)                                            01990000
  3142.       return                                                            01991000
  3143.     end                                                                 01992000
  3144.   posting=1                                                             01993000
  3145.   Address COMMAND 'GLOBALV SETL NEWSGROUP' group                        01994000
  3146.   Address COMMAND 'GLOBALV SET ARTICLE '||,                             01995000
  3147.                    word(Selected_Articles.1,1)                          01996000
  3148.      Address COMMAND 'GLOBALV SET LARTICLE 0'                           01997000
  3149.      Address COMMAND 'GLOBALV SET FARTICLE 0'                           01998000
  3150.    do while(posting)                                                    01999000
  3151.      Selected_Articles.0=count                                          02000000
  3152.      Address COMMAND 'GLOBALV GET HEADERS'                              02001000
  3153.      Address COMMAND 'GLOBALV GET ARTICLE'                              02002000
  3154.      Address COMMAND 'GLOBALV SET POSTING 0'                            02003000
  3155.      nntprc=NEWSSeleS(headers group article 0)                          02004000
  3156.      if nntprc^=0 then                                                  02005000
  3157.        do                                                               02006000
  3158.          message=nntprc                                                 02007000
  3159.          index=index-(scrbot-2)                                         02008000
  3160.          Return                                                         02009000
  3161.        end                                                              02010000
  3162.      Address COMMAND 'GLOBALV GET POSTING'                              02011000
  3163.      if posting then                                                    02012000
  3164.         Call POST$MAIL('ARTI')                                          02013000
  3165.    End                                                                  02014000
  3166.    Address COMMAND 'GLOBALV GET LARTICLE'                               02015000
  3167.    Address COMMAND 'GLOBALV GET FARTICLE'                               02016000
  3168.    do i=FArticle to LArticle                                            02017000
  3169.      ptr=Word(Selected_Articles.i,2)                                    02018000
  3170.      prfx.ptr='*'                                                       02019000
  3171.    end                                                                  02020000
  3172.    count=0                                                              02021000
  3173.    Selected_Articles.=''                                                02022000
  3174.    index=index-(scrbot-2)                                               02023000
  3175.    Address COMMAND 'GLOBALV GET MOREGROUPS'                             02024000
  3176.    if moregroups^='QUIT' then Call WhichGroup(moregroups)               02025000
  3177. Return                                                                  02026000
  3178. /*-----------------------------------------------------------------*/   02027000
  3179. /* Routine to handle PFK Thread.                                   */   02028000
  3180. /*-----------------------------------------------------------------*/   02029000
  3181. Thread:                                                                 02030000
  3182.   if (row <= 2 | row > scrbot)&^CMDline then                            02031000
  3183.       message='Cursor outside of area'                                  02032000
  3184.   else                                                                  02033000
  3185.     do                                                                  02034000
  3186.       ptr=index-scrbot+row                                              02035000
  3187.       if ptr>item.0&^CMDline then                                       02036000
  3188.         message='Cursor outside of area'                                02037000
  3189.       else                                                              02038000
  3190.         do                                                              02039000
  3191.           if CMDline then                                               02040000
  3192.             tstsub=subword(line,2)                                      02041000
  3193.           else                                                          02042000
  3194.             parse upper value item.ptr with . '4a'x tstsub       /*stk*/02043000
  3195.           if word(tstsub,1)='RE:' then                                  02044000
  3196.             tstsub=subword(tstsub,2)                                    02045000
  3197.           queue group                                                   02046000
  3198.           save_items=''                                                 02047000
  3199.           do i=1 to item.0                                              02048000
  3200.             if index(translate(item.i),tstsub)>0 then                   02049000
  3201.               do                                                        02050000
  3202.                queue prfx.i||item.i                                     02051000
  3203.                save_items=save_items||i||' '                            02052000
  3204.               end                                                       02053000
  3205.           end                                                           02054000
  3206.           queue '.'                                                     02055000
  3207.           Address COMMAND 'GLOBALV SET THREAD 1'                        02056000
  3208.           thread_log=''                                                 02057000
  3209.           thread_log=NNR$XHDR(group||' 0 0$'||'ff'x)                    02058000
  3210.           Address COMMAND 'GLOBALV SET THREAD 0'                        02059000
  3211.           do i=1 to length(thread_log)                                  02060000
  3212.             ptr=word(save_items,i)                                      02061000
  3213.             prfx.ptr=substr('.*',substr(thread_log,i,1)+1,1)            02062000
  3214.           end                                                           02063000
  3215.           thread_log=''                                                 02064000
  3216.           save_items=''                                                 02065000
  3217.         end                                                             02066000
  3218.      end                                                                02067000
  3219.    index=index-(scrbot-2)                                               02068000
  3220. Return                                                                  02069000
  3221. /*-----------------------------------------------------------------*/   02070000
  3222. /* Routine to handle PFK Reduce.                                   */   02071000
  3223. /*-----------------------------------------------------------------*/   02072000
  3224. Reduce:                                                                 02073000
  3225.    queue group                                                          02074000
  3226.    save_items=''                                                        02075000
  3227.    do i=1 to item.0                                                     02076000
  3228.      if prfx.i^='*' then                                                02077000
  3229.        do                                                               02078000
  3230.          queue prfx.i||item.i                                           02079000
  3231.          save_items=save_items||i||' '                                  02080000
  3232.        end                                                              02081000
  3233.    end                                                                  02082000
  3234.    if save_items='' then                                                02083000
  3235.      do                                                                 02084000
  3236.        message='There were *no* unread articles(nothing to reduce to)!' 02085000
  3237.        index=index-(scrbot-2)                                           02086000
  3238.        return                                                           02087000
  3239.      end                                                                02088000
  3240.    queue '.'                                                            02089000
  3241.    reduce_log=''                                                        02090000
  3242.    Address COMMAND 'GLOBALV SET REDUCE 1'                               02091000
  3243.    Address COMMAND 'GLOBALV SET REDUCECNT' reducecnt+1                  02092000
  3244.    reduce_log=NNR$XHDR(group||' 0 0$'||'ff'x)                           02093000
  3245.    Address COMMAND 'GLOBALV SET REDUCE 0'                               02094000
  3246.    Address COMMAND 'GLOBALV SET REDUCECNT' reducecnt-1                  02095000
  3247.    do i=1 to length(reduce_log)                                         02096000
  3248.      if substr(reduce_log,i,1) then                                     02097000
  3249.        do                                                               02098000
  3250.          ptr=word(save_items,i)                                         02099000
  3251.          prfx.ptr='*'                                                   02100000
  3252.        end                                                              02101000
  3253.    end                                                                  02102000
  3254.    thread_log=''                                                        02103000
  3255.    save_items=''                                                        02104000
  3256.    index=index-(scrbot-2)                                               02105000
  3257. Return                                                                  02106000
  3258. /*-----------------------------------------------------------------*/   02107000
  3259. /* Routine to handle PFK Posting.                                  */   02108000
  3260. /*-----------------------------------------------------------------*/   02109000
  3261. XHDR_Post:                                                              02110000
  3262.   if (row <= 2 | row > scrbot) then                                     02111000
  3263.       message='Cursor outside of area'                                  02112000
  3264.   else                                                                  02113000
  3265.     do                                                                  02114000
  3266.       ptr=index-scrbot+row                                              02115000
  3267.       if ptr>item.0 then                                                02116000
  3268.         message='Cursor outside of area'                                02117000
  3269.       else                                                              02118000
  3270.         do                                                              02119000
  3271.           Address COMMAND 'GLOBALV SETL NEWSGROUP' group                02120000
  3272.           Address COMMAND 'GLOBALV SETL SUBJECT',                       02121000
  3273.                                   substr(item.ptr,28)                   02122000
  3274.           Call POST$MAIL('XHDR')                                        02123000
  3275.         end                                                             02124000
  3276.     end                                                                 02125000
  3277.   index=index-(scrbot-2)                                                02126000
  3278. Return                                                                  02127000
  3279. /*-----------------------------------------------------------------*/   02128000
  3280. /* Routine to handle PFK Backward.                                 */   02129000
  3281. /*-----------------------------------------------------------------*/   02130000
  3282. XHDR_Backward:                                                          02131000
  3283.   row=3;col=1                                                    /*stk*/02132000
  3284.   if index-(scrbot*2-4) > 1 then                                        02133000
  3285.     index=index-(scrbot*2-4)                                            02134000
  3286.   else                                                                  02135000
  3287.     Do                                                                  02136000
  3288.       message='Reached Top of File'                                     02137000
  3289.       index=0                                                           02138000
  3290.     End                                                                 02139000
  3291. Return                                                                  02140000
  3292. /*-----------------------------------------------------------------*/   02141000
  3293. /* Routine to handle PFK Forward.                                  */   02142000
  3294. /*-----------------------------------------------------------------*/   02143000
  3295. XHDR_Forward:                                                           02144000
  3296.    row=3;col=1                                                   /*stk*/02145000
  3297.    if index+(scrbot-2) < item.0+(scrbot-2) then                         02146000
  3298.      nop                                                                02147000
  3299.    else                                                                 02148000
  3300.      Do                                                                 02149000
  3301.        message='Reached End of File'                                    02150000
  3302.        index=index-(scrbot-2)                                           02151000
  3303.      End                                                                02152000
  3304. Return                                                                  02153000
  3305. POST$MAIL: Procedure                                                    02154000
  3306. arg PostScreen                                                          02155000
  3307. /**---------------------------------------------------------------**/   02156000
  3308. /** Network News Reader                                           **/   02157000
  3309. /**                                                       POSTMAIL**/   02158000
  3310. /**---------------------------------------------------------------**/   02159000
  3311. pbrc = 'Not really initialized.'  /* cf. line 02072420  */              02160000
  3312. 'Extract /lscreen'                                                      02161000
  3313. 'Set msgline on' lscreen.1-3 '2 overlay'                                02162000
  3314. 'SET PF04 ONLY dummy'                                                   02163000
  3315. 'SET PF16 ONLY dummy'                                                   02164000
  3316. Address COMMAND 'EXECIO 1 CP ( VAR MYTIME STRING QUERY TIME'            02165000
  3317. mytime=word(mytime,3)||' '||word(mytime,4)                              02166000
  3318. Address COMMAND 'GLOBALV SELECT VMNNTP'                                 02167000
  3319. Address COMMAND 'GLOBALV GET THISNODE'                                  02168000
  3320. Address COMMAND 'GLOBALV GET MAILER'                                    02169000
  3321. Address COMMAND 'GLOBALV GET ORGANIZATION'                              02170000
  3322. Address COMMAND 'GLOBALV GET NEWSGROUP'                                 02171000
  3323. Address COMMAND 'GLOBALV GET SUBJECT'                                   02172000
  3324. Address COMMAND 'GLOBALV GET VERSION'                                   02173000
  3325. Address COMMAND 'GLOBALV GET HEADERS'                                   02174000
  3326. Address COMMAND 'GLOBALV GET SOCKET'                                    02175000
  3327. Address COMMAND 'GLOBALV GET LOGPOSTS'                                  02176000
  3328. head.=''                                                                02177000
  3329. posth.=''                                                               02178000
  3330. postb.=''                                                               02179000
  3331. flag = 'POSTMAIL'                                                       02180000
  3332. Address Command 'SET CMSTYPE HT'                                        02181000
  3333. Address Command 'STATE $POST$ $$NEWS$$ A'                               02182000
  3334. PrevRC=rc                                                               02183000
  3335. Address Command 'SET CMSTYPE RT'                                        02184000
  3336. if PostScreen='ARTI' then                                               02185000
  3337.   Call ProcessPScreen1                                                  02186000
  3338. else if Prevrc=0 then                                                   02187000
  3339.   do                                                                    02188000
  3340.     Queue '************************************************************'02189000
  3341.     Queue '*                                                          *'02190000
  3342.     Queue '* You have come to this screen because you have started a  *'02191000
  3343.     Queue '* previous POSTing/MAILing. At this point you may "ERASE"  *'02192000
  3344.     Queue '* or "Resume" the previous "POSTing".                      *'02193000
  3345.     Queue '*                                                          *'02194000
  3346.     Queue '************************************************************'02195000
  3347.     Queue '.'                                                           02196000
  3348.     Call ProcessPScreen1                                                02197000
  3349.   end                                                                   02198000
  3350. if flag^='QUIT' Then                                                    02199000
  3351.   Call ProcessPScreen2                                                  02200000
  3352. Address COMMAND 'SET CMSTYPE HT'                                        02201000
  3353. Address COMMAND 'ERASE N$N$T$P$ P$O$S$T$'                               02202000
  3354. Address COMMAND 'SET CMSTYPE RT'                                        02203000
  3355. Return                                                                  02204000
  3356. /*-----------------------------------------------------------------*/   02205000
  3357. /* Routine to display the main menu screen.                        */   02206000
  3358. /*-----------------------------------------------------------------*/   02207000
  3359. ProcessPScreen1:                                                        02208000
  3360.    i=1                                                                  02209000
  3361.    parse pull head.i                                                    02210000
  3362.    do while (head.i^='.')                                               02211000
  3363.      i=i+1                                                              02212000
  3364.      parse pull head.i                                                  02213000
  3365.      do while index(head.i,'ff'x)>0                                     02214000
  3366.        parse pull tempstr                                               02215000
  3367.        head.i=substr(head.i,1,length(head.i)-1)||tempstr                02216000
  3368.      end                                                                02217000
  3369.    end                                                                  02218000
  3370.    head.i=''                                                            02219000
  3371.    i=i-1                                                                02220000
  3372.    head.0=i                                                             02221000
  3373.    Address Command 'SET CMSTYPE HT'                                     02222000
  3374.    Address Command 'STATE $POST$ $$NEWS$$ A'                            02223000
  3375.    PrevRC=rc                                                            02224000
  3376.    Address Command 'SET CMSTYPE RT'                                     02225000
  3377.    if Prevrc=0 then                                                     02226000
  3378.      message='Previous POST file exists, either "Resume" or "ERASE"'    02227000
  3379.    else                                                                 02228000
  3380.      message = '';                                                      02229000
  3381.    newsub=''                                                            02230000
  3382.    row=lscreen.1; col=7                                                 02231000
  3383.    Address COMMAND 'DESBUF'                                             02232000
  3384.    Do Forever;                                                          02233000
  3385.      Call 1st_post                                                      02234000
  3386.      'Read Nochange Tag'                                                02235000
  3387.       'Extract /cursor'                                                 02236000
  3388.      row = cursor.5; col = cursor.6                                     02237000
  3389.      num=0                                                              02238000
  3390.      Do While(Queued()>0)                                               02239000
  3391.        num=num+1                                                        02240000
  3392.        Parse Pull QueuedLine.num                                        02241000
  3393.      end                                                                02242000
  3394.      do i=1 to num                                                      02243000
  3395.        Parse var QueuedLine.i key line column string;                   02244000
  3396.        if key = "RES" Then Nop                                          02245000
  3397.        else SaveQueued=QueuedLine.i                                     02246000
  3398.      end                                                                02247000
  3399.      Parse Var SaveQueued key line column string;                       02248000
  3400.      Select                                                             02249000
  3401.        When key = "CMD" Then Call POST1_CommandLine                     02250000
  3402.        When key = "PFK" Then Call POST1_PFKeys                          02251000
  3403.        When key = "ETK" Then                                            02252000
  3404.          do                                                             02253000
  3405.            'CURSOR HOME'                                                02254000
  3406.            'EXTRACT /CURSOR/'                                           02255000
  3407.            row=cursor.1                                                 02256000
  3408.            col=cursor.2                                                 02257000
  3409.          end                                                            02258000
  3410.        otherwise Nop                                                    02259000
  3411.      End                                                                02260000
  3412.      If flag^='POSTMAIL' then                                           02261000
  3413.        leave                                                            02262000
  3414.    End                                                                  02263000
  3415. Return                                                                  02264000
  3416. /*-----------------------------------------------------------------*/   02265000
  3417. /* Routine to display the main menu screen.                        */   02266000
  3418. /*-----------------------------------------------------------------*/   02267000
  3419. 1st_post:                            /* set each line of the screen */  02268000
  3420.    'Set Reserved' 1 'noh' '29'x'!             ' '29'x'@',               02269000
  3421.                   center('*** NNR/VM ('||version||') ***',35),          02270000
  3422.                   right('Post(1)',25),                                  02271000
  3423.                   '29'x'!                    '                          02272000
  3424.    'Set Reserved' 2 'noh'                                               02273000
  3425.    'Set Reserved' 3 'noh' '29'x'!'||,                                   02274000
  3426. 'Posting is setup in multiple stages. Stage 1 (this stage) requires'||, 02275000
  3427.                           '29'x'!'                                      02276000
  3428.    'Set Reserved' 4 'noh' '29'x'!'||,                                   02277000
  3429. 'you to select how the article is to be manipulated. Please select'||,  02278000
  3430.                           '29'x'!'                                      02279000
  3431.    'Set Reserved' 5 'noh' '29'x'!'||,                                   02280000
  3432. 'one of the PFKs listed below.'||,                                      02281000
  3433.                           '29'x'!'                                      02282000
  3434.    'Set Reserved' 6 'noh'                                               02283000
  3435.    Do scrpos=7 to lscreen.1-4                                           02284000
  3436.    index=scrpos-7+1                                                     02285000
  3437.    'Set Reserved' scrpos 'noh' '29'x'*'||left(head.index,78)||'29'x'!'  02286000
  3438.    End                                                                  02287000
  3439.    'Set Reserved' lscreen.1-3 'noh'                                     02288000
  3440.    'Set Reserved' lscreen.1-2 'high',                                   02289000
  3441.                                  ' 1= Help     ',                       02290000
  3442.                                ||'2=          ',                        02291000
  3443.                                ||'3= Quit     ',                        02292000
  3444.                                ||' 4=          ',                       02293000
  3445.                                ||' 5=          ',                       02294000
  3446.                                ||' 6= Resume  '                         02295000
  3447.    'Set Reserved' lscreen.1-1 'high',                                   02296000
  3448.                                  ' 7=          ',                       02297000
  3449.                                ||'8=          ',                        02298000
  3450.                                ||'9= Followup ',                        02299000
  3451.                                ||'10= Mail     ',                       02300000
  3452.                                ||'11= Reply    ',                       02301000
  3453.                                ||'12= ERASE   '                         02302000
  3454.    If message ^= "" Then                                                02303000
  3455.       Do                                                                02304000
  3456.          'EMSG' message                                                 02305000
  3457.          message = ''                                                   02306000
  3458.       End;                                                              02307000
  3459.    'Cursor screen' row col                                              02308000
  3460. Return                                                                  02309000
  3461. /*-----------------------------------------------------------------*/   02310000
  3462. /* Routine to pick off the command line.                           */   02311000
  3463. /*-----------------------------------------------------------------*/   02312000
  3464. POST1_CommandLine:                                                      02313000
  3465.    line=translate(line)                                                 02314000
  3466.    If (Abbrev('QQUIT',line,2) | line = 'QUIT') Then                     02315000
  3467.      Do                                                                 02316000
  3468.        Flag = 'QUIT'         /* clear stack                 */          02317000
  3469.      End                                                                02318000
  3470.    Else If (Abbrev('ERASE',line,3) | line = 'ERASE') Then               02319000
  3471.        Call ERASE_Post                                                  02320000
  3472.    Else                                                                 02321000
  3473.      message = 'Unsupported command:' line column string                02322000
  3474. Return                                                                  02323000
  3475. /*-----------------------------------------------------------------*/   02324000
  3476. /* Routine to handle the PFKs key.                                 */   02325000
  3477. /*-----------------------------------------------------------------*/   02326000
  3478. POST1_PFKeys:                                                           02327000
  3479.    Call PFKmap                                                          02328000
  3480.    If Line=1 then Call NNR$HELP(4)                                      02329000
  3481.    else If Line=3 then Flag = 'QUIT'                                    02330000
  3482.    else If Line=6 then Call Resume_Post                                 02331000
  3483.    else If Line=9 then Flag = 'FOLLOWUP'                                02332000
  3484.    else If Line=10 then Flag = 'MAIL'                                   02333000
  3485.    else If Line=11 then Flag = 'REPLY'                                  02334000
  3486.    else If Line=12 then Call ERASE_Post                                 02335000
  3487.    else message='Unsupported PFK'                                       02336000
  3488.    if (PrevRC=0) & ((Flag^='RESUME') & (Flag^='QUIT')) then             02337000
  3489.      do                                                                 02338000
  3490.        message=,                                                        02339000
  3491.        'Previous POST file exists, either "Resume" or "ERASE"'          02340000
  3492.        Flag='POSTMAIL'                                                  02341000
  3493.      end                                                                02342000
  3494. Return                                                                  02343000
  3495. /*-----------------------------------------------------------------*/   02344000
  3496. /* Routine to handle ERASE PFK Key.                                */   02345000
  3497. /*-----------------------------------------------------------------*/   02346000
  3498. ERASE_Post:                                                             02347000
  3499.    if PrevRC=0 then                                                     02348000
  3500.      do                                                                 02349000
  3501.        PrevRC=-1                                                        02350000
  3502.        if PostScreen^='ARTI' then Flag='POST_ERASE'                     02351000
  3503.        Address Command 'SET CMSTYPE HT'                                 02352000
  3504.        Address Command 'ERASE $POST$ $$NEWS$$ A'                        02353000
  3505.        Address Command 'SET CMSTYPE RT'                                 02354000
  3506.      end                                                                02355000
  3507.    else message='Previous POST file does not exist!'                    02356000
  3508. Return                                                                  02357000
  3509. /*-----------------------------------------------------------------*/   02358000
  3510. /* Routine to handle resume PFK Key.                               */   02359000
  3511. /*-----------------------------------------------------------------*/   02360000
  3512. Resume_Post:                                                            02361000
  3513.    if PrevRC=0 then                                                     02362000
  3514.      do                                                                 02363000
  3515.        Flag='RESUME'                                                    02364000
  3516.        PostScreen='RESU'                                                02365000
  3517.        Address Command 'SET CMSTYPE HT'                                 02366000
  3518.        Address Command 'ERASE N$N$T$P$ P$O$S$T$ A'                      02367000
  3519.        Address Command 'SET CMSTYPE RT'                                 02368000
  3520.      end                                                                02369000
  3521.    else message='Previous POST file does not exist!'                    02370000
  3522. Return                                                                  02371000
  3523. /*-----------------------------------------------------------------*/   02372000
  3524. /* Routine to Process the 2nd post menu screen.                    */   02373000
  3525. /*-----------------------------------------------------------------*/   02374000
  3526. ProcessPScreen2:                                                        02375000
  3527. mailTo=''                                                               02376000
  3528. if PostScreen='ARTI' then                                               02377000
  3529.   do                                                                    02378000
  3530.     do i=1 to head.0                                                    02379000
  3531.       if substr(head.i,1,length('From:'))='From:' then                  02380000
  3532.         head.F=strip(substr(head.i,length('From:')+1))                  02381000
  3533.       if substr(head.i,1,length('Newsgroups:'))='Newsgroups:' then      02382000
  3534.         head.N=strip(substr(head.i,length('Newsgroups:')+1))            02383000
  3535.       if substr(head.i,1,length('Subject:'))='Subject:' then            02384000
  3536.         head.S=strip(substr(head.i,length('Subject:')+1))               02385000
  3537.       if substr(head.i,1,length('Message-ID:'))='Message-ID:' then      02386000
  3538.         head.M=strip(substr(head.i,length('Message-ID:')+1))            02387000
  3539.       if substr(head.i,1,length('Date:'))='Date:' then                  02388000
  3540.         head.D=strip(substr(head.i,length('Date:')+1))                  02389000
  3541.       if substr(head.i,1,length('References:'))='References:' then      02390000
  3542.         head.R=strip(substr(head.i,length('References:')+1))            02391000
  3543.     end                                                                 02392000
  3544.     subject=head.S                                                      02393000
  3545.     if Flag='MAIL' | Flag='REPLY' Then                                  02394000
  3546.       newsgroup=''                                                      02395000
  3547.     else                                                                02396000
  3548.       newsgroup=head.N                                                  02397000
  3549.   end                                                                   02398000
  3550. Else If PostScreen='SHLI' then                                          02399000
  3551.   do                                                                    02400000
  3552.     Address COMMAND 'GLOBALV GET NEWSGROUP'                             02401000
  3553.     Subject=''                                                          02402000
  3554.   end                                                                   02403000
  3555. Else If PostScreen='CMS' then                                           02404000
  3556.   do                                                                    02405000
  3557.     Address COMMAND 'GLOBALV GET NEWSGROUP'                             02406000
  3558.     Subject=''                                                          02407000
  3559.   end                                                                   02408000
  3560. Else If PostScreen='XHDR' then                                          02409000
  3561.   do                                                                    02410000
  3562.     Address COMMAND 'GLOBALV GET NEWSGROUP'                             02411000
  3563.     Address COMMAND 'GLOBALV GET SUBJECT'                               02412000
  3564.   end                                                                   02413000
  3565. Else If PostScreen='RESU' then                                          02414000
  3566.   do                                                                    02415000
  3567.     Address COMMAND 'EXECIO * DISKR $POST$ $$NEWS$$ A ('||,             02416000
  3568.              'FINIS STEM HEAD.'                                         02417000
  3569.     Address COMMAND 'ERASE $POST$ $$OLDN$$ A'                           02418000
  3570.     Address COMMAND 'RENAME $POST$ $$NEWS$$ A $POST$ $$OLDN$$ A'        02419000
  3571.     do i=1 to head.0 while length(strip(head.i)) > 0                    02420000
  3572.       if substr(head.i,1,length('From:'))='From:' then                  02421000
  3573.         head.F=strip(substr(head.i,length('From:')+1))                  02422000
  3574.       if substr(head.i,1,length('Newsgroups:'))='Newsgroups:' then      02423000
  3575.         head.N=strip(substr(head.i,length('Newsgroups:')+1))            02424000
  3576.       if substr(head.i,1,length('Subject:'))='Subject:' then            02425000
  3577.         head.S=strip(substr(head.i,length('Subject:')+1))               02426000
  3578.       if substr(head.i,1,length('Message-ID:'))='Message-ID:' then      02427000
  3579.         head.M=strip(substr(head.i,length('Message-ID:')+1))            02428000
  3580.       if substr(head.i,1,length('Date:'))='Date:' then                  02429000
  3581.         head.D=strip(substr(head.i,length('Date:')+1))                  02430000
  3582.       if substr(head.i,1,length('To:'))='To:' then                      02431000
  3583.         head.T=strip(substr(head.i,length('To:')+1))                    02432000
  3584.       if substr(head.i,1,length('References:'))='References:' then      02433000
  3585.         head.R=strip(substr(head.i,length('References:')+1))            02434000
  3586.     end                                                                 02435000
  3587.     subject=head.S                                                      02436000
  3588.     newsgroup=head.N                                                    02437000
  3589.     mailto=head.T                                                       02438000
  3590.     Address COMMAND 'ERASE N$N$T$P$ P$O$S$T$ A'                         02439000
  3591.     Do j=i+1 to head.0                                                  02440000
  3592.       Address COMMAND 'EXECIO 1 DISKW N$N$T$P$ P$O$S$T$ A',             02441000
  3593.          '0 V 150 ( STRING' head.j                                      02442000
  3594.     End                                                                 02443000
  3595.     Address COMMAND 'FINIS N$N$T$P$ P$O$S$T$ A'                         02444000
  3596.   end                                                                   02445000
  3597. NewHead.=''                                                             02446000
  3598. subject=strip(subject)                                                  02447000
  3599. newsgroup=strip(newsgroup)                                              02448000
  3600. mailTo=strip(mailTo)                                                    02449000
  3601. If PostScreen^='RESU' &,                                                02450000
  3602.   subject^='' &,                                                        02451000
  3603.   translate(left(subject,3)) ^= 'RE:' then                              02452000
  3604.   NewHead.S='Re: '||subject                                             02453000
  3605. else                                                                    02454000
  3606.   NewHead.S=subject                                                     02455000
  3607. NewHead.N=newsgroup                                                     02456000
  3608. NewHead.T=mailTo                                                        02457000
  3609. Address COMMAND 'SET CMSTYPE HT'                                        02458000
  3610. fullname = Fullname()                                                   02459000
  3611. Address COMMAND 'SET CMSTYPE RT'                                        02460000
  3612. If fullname^='' then                                                    02461000
  3613.   fullname = ' ('||fullname||')'                                        02462000
  3614. NewHead.F=userid()||'@'||thisnode||fullname                             02463000
  3615. NewHead.P=thisnode||'!'||userid()                                       02464000
  3616. mydate=date('U')                                                        02465000
  3617. parse var mydate mm '/' dd '/' yy                                       02466000
  3618. wkd=substr(date('W'),1,3)                                               02467000
  3619. mon=substr(date('M'),1,3)                                               02468000
  3620. NewHead.D=wkd||',' dd mon yy mytime                                     02469000
  3621. NewHead.O=organization                                                  02470000
  3622. local_part=d2x(date('J'))d2x(time('S'))'.'userid()                      02471000
  3623. NewHead.M='<'local_part'@'thisnode'>'                                   02472000
  3624. if Flag='RESUME' | Flag='POST_ERASE' then                               02473000
  3625.   NewHead.R=Head.R                                                      02474000
  3626. else                                                                    02475000
  3627.   NewHead.R=Head.R||' '||Head.M                                         02476000
  3628. if Flag='REPLY' Then                                                    02477000
  3629.   NewHead.T=Head.F                                                      02478000
  3630. message = '';                                                           02479000
  3631. successful='0'                                                          02480000
  3632. row=lscreen.1; col=7                                                    02481000
  3633. Address COMMAND 'DESBUF'                                                02482000
  3634. Do Forever                                                              02483000
  3635.   Call 2nd_post                                                         02484000
  3636.   'Read Nochange Tag'                                                   02485000
  3637.   'Extract /cursor'                                                     02486000
  3638.   row = cursor.5; col = cursor.6;                                       02487000
  3639.   num=0                                                                 02488000
  3640.   Do While(Queued()>0)                                                  02489000
  3641.     num=num+1                                                           02490000
  3642.     Parse Pull QueuedLine.num                                           02491000
  3643.   end                                                                   02492000
  3644.   do i=1 to num                                                         02493000
  3645.     Parse var QueuedLine.i key line column string;                      02494000
  3646.     if key = "RES" Then Call POST2_Reserved                             02495000
  3647.     else SaveQueued=QueuedLine.i                                        02496000
  3648.   end                                                                   02497000
  3649.   Parse Var SaveQueued key line column string;                          02498000
  3650.   Select                                                                02499000
  3651.     When key = "CMD" Then Call POST2_CommandLine                        02500000
  3652.     When key = "PFK" Then Call POST2_PFKeys                             02501000
  3653.     When key = "ETK" Then                                               02502000
  3654.       do                                                                02503000
  3655.         'CURSOR HOME'                                                   02504000
  3656.         'EXTRACT /CURSOR/'                                              02505000
  3657.         row=cursor.1                                                    02506000
  3658.         col=cursor.2                                                    02507000
  3659.       end                                                               02508000
  3660.     otherwise Nop                                                       02509000
  3661.   End                                                                   02510000
  3662.   If flag='QUIT' then                                                   02511000
  3663.     leave                                                               02512000
  3664. End                                                                     02513000
  3665. Return                                                                  02514000
  3666. /*-----------------------------------------------------------------*/   02515000
  3667. /* Routine to handle reserved lines.                               */   02516000
  3668. /*-----------------------------------------------------------------*/   02517000
  3669. POST2_Reserved:                                                         02518000
  3670.   string=strip(string)                                                  02519000
  3671.   if line = 8 Then                                                      02520000
  3672.     NewHead.F=string                                                    02521000
  3673.   else if line = 9 Then                                                 02522000
  3674.     do                                                                  02523000
  3675.      if Flag='MAIL' | Flag='REPLY' | NewHead.N='' Then                  02524000
  3676.        do                                                               02525000
  3677.          NewHead.T=MailName(string)                                     02526000
  3678.        end                                                              02527000
  3679.      else                                                               02528000
  3680.        do                                                               02529000
  3681.          if length(string)>0 then                                       02530000
  3682.            NewHead.N=string                                             02531000
  3683.          else                                                           02532000
  3684.            Message='Newsgroups header *must* have a value!'             02533000
  3685.        end                                                              02534000
  3686.     end                                                                 02535000
  3687.   else if line = 10 Then                                                02536000
  3688.     NewHead.S=string                                                    02537000
  3689. Return                                                                  02538000
  3690. /*-----------------------------------------------------------------*/   02539000
  3691. /* Routine to handle the PFKs key.                                 */   02540000
  3692. /*-----------------------------------------------------------------*/   02541000
  3693. POST2_PFKeys:                                                           02542000
  3694.    Call PFKmap                                                          02543000
  3695.    If Line=1 then Call NNR$HELP(3)                                      02544000
  3696.    else If Line=5 then Call Post_Edit                                   02545000
  3697.    else If Line=3 then call Post_Quit                                   02546000
  3698.    else If Line=6 then call PM_Article                                  02547000
  3699.    else message='Unsupported PFK'                                       02548000
  3700. Return                                                                  02549000
  3701. /*-----------------------------------------------------------------*/   02550000
  3702. /* Routine to pick off the command line.                           */   02551000
  3703. /*-----------------------------------------------------------------*/   02552000
  3704. POST2_CommandLine:                                                      02553000
  3705.    line=translate(line)                                                 02554000
  3706.    If (Abbrev('QQUIT',line,2) | line = 'QUIT') Then                     02555000
  3707.      Do                                                                 02556000
  3708.        Flag = 'QUIT'         /* clear stack                 */          02557000
  3709.      End                                                                02558000
  3710.    Else                                                                 02559000
  3711.      message = 'Unsupported command:' line column string                02560000
  3712. Return                                                                  02561000
  3713. /*-----------------------------------------------------------------*/   02562000
  3714. /* Routine to display the 2nd post menu screen.                    */   02563000
  3715. /*-----------------------------------------------------------------*/   02564000
  3716. 2nd_post:                            /* set each line of the screen */  02565000
  3717.    'Set Reserved' 1 'noh' '29'x'!             ' '29'x'@',               02566000
  3718.                   center('*** NNR/VM ('||version||') ***',35),          02567000
  3719.                   right('Post(2)',25),                                  02568000
  3720.                   '29'x'!                    '                          02569000
  3721.    'Set Reserved' 2 'noh'                                               02570000
  3722.    'Set Reserved' 3 'noh' '29'x'!'||,                                   02571000
  3723. 'Posting is setup in multiple stages. On this screen you are required', 02572000
  3724.                           '29'x'!'                                      02573000
  3725.    'Set Reserved' 4 'noh' '29'x'!'||,                                   02574000
  3726. 'to fill in the highlighted fields and make any modifications to the'||,02575000
  3727.                           '29'x'!'                                      02576000
  3728.    'Set Reserved' 5 'noh' '29'x'!'||,                                   02577000
  3729. 'header area. When the needed information has been supplied please '||, 02578000
  3730.                           '29'x'!'                                      02579000
  3731.    'Set Reserved' 6 'noh' '29'x'!'||,                                   02580000
  3732. 'select from the PFK list below.                                    '||,02581000
  3733.                           '29'x'!'                                      02582000
  3734.    'Set Reserved' 7 'noh'                                               02583000
  3735.    'Set Reserved' 8 'noh' '29'x'@ From:'||'29'x'*'||,                   02584000
  3736.                   Left(NewHead.F,60)'29'x'!'                            02585000
  3737.    if Flag='MAIL' | Flag='REPLY' | NewHead.N='' Then                    02586000
  3738.      do                                                                 02587000
  3739.        'Set Reserved' 9 'noh' '29'x'@ To:'||'29'x'*'||,                 02588000
  3740.                   Left(NewHead.T,60)'29'x'!'                            02589000
  3741.      end                                                                02590000
  3742.    else                                                                 02591000
  3743.      do                                                                 02592000
  3744.        'Set Reserved' 9 'noh' '29'x'@ Newsgroups:'||'29'x'*'||,         02593000
  3745.                   Left(NewHead.N,60)'29'x'!'                            02594000
  3746.      end                                                                02595000
  3747.    'Set Reserved' 10 'noh' '29'x'@ Subject:'||'29'x'*'||,               02596000
  3748.                   Left(NewHead.S,60)'29'x'!'                            02597000
  3749.    Do scrpos=11 to lscreen.1-4                                          02598000
  3750.    'Set Reserved' scrpos 'noh'                                          02599000
  3751.    End                                                                  02600000
  3752.    'Set Reserved' lscreen.1-3 'noh'                                     02601000
  3753.    'Set Reserved' lscreen.1-2 'high',                                   02602000
  3754.                                  ' 1= Help     ',                       02603000
  3755.                                ||'2=          ',                        02604000
  3756.                                ||'3= Quit     ',                        02605000
  3757.                                ||' 4=          ',                       02606000
  3758.                                ||' 5= Edit     ',                       02607000
  3759.                                ||' 6= Send    '                         02608000
  3760.    'Set Reserved' lscreen.1-1 'high',                                   02609000
  3761.                                  ' 7=          ',                       02610000
  3762.                                ||'8=          ',                        02611000
  3763.                                ||'9=          ',                        02612000
  3764.                                ||'10=          ',                       02613000
  3765.                                ||'11=          ',                       02614000
  3766.                                ||'12=         '                         02615000
  3767.    If message ^= "" Then                                                02616000
  3768.       Do                                                                02617000
  3769.          'EMSG' message                                                 02618000
  3770.          message = ''                                                   02619000
  3771.       End;                                                              02620000
  3772.    'Cursor screen' row col                                              02621000
  3773. Return                                                                  02622000
  3774. /*-----------------------------------------------------------------*/   02623000
  3775. /* Routine to determine post or mail                               */   02624000
  3776. /*-----------------------------------------------------------------*/   02625000
  3777. PM_Article:                                                             02626000
  3778.    if Flag='MAIL' | Flag='REPLY' | NewHead.N='' Then                    02627000
  3779.      Call Mail_Article                                                  02628000
  3780.    else                                                                 02629000
  3781.      Call Post_Article                                                  02630000
  3782. Return                                                                  02631000
  3783. /*-----------------------------------------------------------------*/   02632000
  3784. /* Routine to Exit PostMail procedure                              */   02633000
  3785. /*-----------------------------------------------------------------*/   02634000
  3786. Post_Quit:                                                              02635000
  3787.   Address COMMAND 'ERASE $POST$ $$NEWS$$ A'                             02636000
  3788.   if Successful then                                                    02637000
  3789.     do                                                                  02638000
  3790.       if LogPosts then                                                  02639000
  3791.         do                                                              02640000
  3792.           notebook='NNRPMLOG'                                           02641000
  3793.           Address COMMAND 'EXECIO 1 DISKW' notebook,                    02642000
  3794.                             'NOTEBOOK A 0 V 132 (STRING' copies('=',72) 02643000
  3795.           Address COMMAND 'EXECIO' posth.0 'DISKW' notebook,            02644000
  3796.                              'NOTEBOOK A 0 V 132 ( FINIS STEM POSTH.'   02645000
  3797.           Address COMMAND 'EXECIO 1 DISKW' notebook,                    02646000
  3798.                              'NOTEBOOK A 0 V 132 ( STRING  '            02647000
  3799.           Address COMMAND 'EXECIO' postb.0 'DISKW' notebook,            02648000
  3800.                              'NOTEBOOK A 0 V 132 ( FINIS STEM POSTB.'   02649000
  3801.         end                                                             02650000
  3802.       Address COMMAND 'ERASE $POST$ $$OLDN$$ A'                         02651000
  3803.     end                                                                 02652000
  3804.   else if postb.0^='' then                                              02653000
  3805.     do                                                                  02654000
  3806.       Call GenHeaders                                                   02655000
  3807.       Address COMMAND 'EXECIO' posth.0 'DISKW $POST$ $$NEWS$$ A',       02656000
  3808.                                      '0 V 1024 (STEM POSTH.'            02657000
  3809.       Address COMMAND 'EXECIO 1 DISKW $POST$ $$NEWS$$ A',               02658000
  3810.                                      '0 V 1024 ( STRING  '              02659000
  3811.       Address COMMAND 'EXECIO' postb.0 'DISKW $POST$ $$NEWS$$ A',       02660000
  3812.                                      '0 V 1024 (FINIS STEM POSTB.'      02661000
  3813.       Address COMMAND 'ERASE $POST$ $$OLDN$$ A'                         02662000
  3814.     end                                                                 02663000
  3815.   else                                                                  02664000
  3816.     do                                                                  02665000
  3817.       Address COMMAND 'RENAME $POST$ $$OLDN$$ A $POST$ $$NEWS$$ A'      02666000
  3818.     end                                                                 02667000
  3819.   Address COMMAND 'DESBUF'                                              02668000
  3820.   flag='QUIT'                                                           02669000
  3821. Return                                                                  02670000
  3822. /*-----------------------------------------------------------------*/   02671000
  3823. /* Routine to find nicknames                                       */   02672000
  3824. /*-----------------------------------------------------------------*/   02673000
  3825. MailName: Procedure                                                     02674000
  3826. parse arg string                                                        02675000
  3827.   newto=string;                                                         02676000
  3828.   rcptto=newto                                                          02677000
  3829.   'STATE' userid() 'NAMES *'                                            02678000
  3830.   if rc=0 then                                                          02679000
  3831.     do                                                                  02680000
  3832.       'NAMEFIND :NICK' newto ' :USERID (LIFO 1'                         02681000
  3833.       if rc=0 then                                                      02682000
  3834.         do                                                              02683000
  3835.          parse pull newuid                                              02684000
  3836.          rcptto=newuid                                                  02685000
  3837.          'NAMEFIND :NICK' newto ' :NODE (LIFO 1'                        02686000
  3838.          if rc=0 then                                                   02687000
  3839.            do                                                           02688000
  3840.              parse pull newnode                                         02689000
  3841.              rcptto=newuid||'@'||newnode                                02690000
  3842.              'NAMEFIND :NICK' newto ' :NAME (LIFO 1'                    02691000
  3843.              if rc=0 then                                               02692000
  3844.                do                                                       02693000
  3845.                  parse pull newname                                     02694000
  3846.                  rcptto=newuid||'@'||newnode||' ('newname')'            02695000
  3847.                end                                                      02696000
  3848.            end                                                          02697000
  3849.         end                                                             02698000
  3850.     end                                                                 02699000
  3851. Return rcptto                                                           02700000
  3852. /*-----------------------------------------------------------------*/   02701000
  3853. /* Function to look up full name of poster                         */   02702000
  3854. /*-----------------------------------------------------------------*/   02703000
  3855. Fullname: procedure expose thisnode                                     02704000
  3856. myname = Namefind(userid(),thisnode)                                    02705000
  3857. if myname='' then                                                       02706000
  3858.   do                                                                    02707000
  3859.     'IDENTIFY (LIFO'                                                    02708000
  3860.     parse pull . . njenode .                                            02709000
  3861.     myname = Namefind(userid(),njenode)                                 02710000
  3862.   end                                                                   02711000
  3863. Return myname                                                           02712000
  3864. /*-----------------------------------------------------------------*/   02713000
  3865. /* Function to look up full name in a nicknames file               */   02714000
  3866. /*-----------------------------------------------------------------*/   02715000
  3867. Namefind: procedure                                                     02716000
  3868. Parse arg userid, node                                                  02717000
  3869. 'STATE' userid() 'NAMES *'                                              02718000
  3870. if rc=0 then                                                            02719000
  3871.   do                                                                    02720000
  3872.     'NAMEFIND :USERID' userid ':NODE' node ':NAME (LIFO 1'              02721000
  3873.     if rc=0 then                                                        02722000
  3874.       parse pull name                                                   02723000
  3875.     else                                                                02724000
  3876.       name = ''                                                         02725000
  3877.   end                                                                   02726000
  3878. else                                                                    02727000
  3879.   name = ''                                                             02728000
  3880. Return name                                                             02729000
  3881. /*-----------------------------------------------------------------*/   02730000
  3882. /* Routine to handle PFK Edit.                                     */   02731000
  3883. /*-----------------------------------------------------------------*/   02732000
  3884. POST_Edit:                                                              02733000
  3885.   if Successful then                                                    02734000
  3886.     do                                                                  02735000
  3887.       message='You have successfully sent your file! Please QUIT!'      02736000
  3888.       Return                                                            02737000
  3889.     end                                                                 02738000
  3890.   Address COMMAND 'GLOBALV SETL POSTFLAG' flag                          02739000
  3891.   If Flag='MAIL' then                                                   02740000
  3892.     do                                                                  02741000
  3893.       queue 'In article '||head.M                                       02742000
  3894.       queue head.F||' writes:'                                          02743000
  3895.       queue ' '                                                         02744000
  3896.       queue copies('-',26)||' Original Message '||copies('-',26)        02745000
  3897.       queue ' '                                                         02746000
  3898.     end                                                                 02747000
  3899.   Else If Flag='REPLY' then                                             02748000
  3900.     do                                                                  02749000
  3901.       queue 'In article '||head.M||' on'                                02750000
  3902.       queue head.D||' you write:'                                       02751000
  3903.       queue ' '                                                         02752000
  3904.     end                                                                 02753000
  3905.   Else If Flag='FOLLOWUP' then                                          02754000
  3906.     do                                                                  02755000
  3907.       queue 'In article '||head.M                                       02756000
  3908.       queue head.F||' writes:'                                          02757000
  3909.       queue ' '                                                         02758000
  3910.     end                                                                 02759000
  3911.    ADDRESS COMMAND 'XEDIT $POST$ $$NEWS$$ A(PROFILE NNR$NOTE WIDTH 150' 02760000
  3912.    Address COMMAND 'SET CMSTYPE HT'                                     02761000
  3913.    Address COMMAND 'EXECIO * DISKR $POST$ $$NEWS$$ A(FINI STEM POSTB.'  02762000
  3914.    pbrc=rc                                                              02763000
  3915.    Address COMMAND 'SET CMSTYPE RT'                                     02764000
  3916.    if pbrc=0 then                                                       02765000
  3917.      do                                                                 02766000
  3918.        Address COMMAND 'COPY $POST$ $$NEWS$$ A',                        02767000
  3919.                              'N$N$T$P$ P$O$S$T$ A ( REPLACE '           02768000
  3920.        Address COMMAND 'ERASE $POST$ $$NEWS$$ A'                        02769000
  3921.      end                                                                02770000
  3922.    else                                                                 02771000
  3923.      message='Your POSTing can not be sent. Please try again'           02772000
  3924.    Flag='RESUME'                                                        02773000
  3925. Return                                                                  02774000
  3926. /*-----------------------------------------------------------------*/   02775000
  3927. /* Routine to handle PFK Headers.                                  */   02776000
  3928. /*-----------------------------------------------------------------*/   02777000
  3929. Post_Article:                                                           02778000
  3930.   if Successful then                                                    02779000
  3931.     do                                                                  02780000
  3932.       message='You have successfully sent your file! Please QUIT!'      02781000
  3933.       Return                                                            02782000
  3934.     end                                                                 02783000
  3935.    Address COMMAND 'DESBUF'                                             02784000
  3936.    Call GenHeaders                                                      02785000
  3937.    if pbrc=0 then                                                       02786000
  3938.      do                                                                 02787000
  3939.        nntprc=NEWSPost()                                                02788000
  3940.        if word(nntprc,1)^='240' & word(nntprc,1)^='340' then            02789000
  3941.          do                                                             02790000
  3942.            message=nntprc                                               02791000
  3943.            Return                                                       02792000
  3944.          end                                                            02793000
  3945.        message=subword(nntprc,2)                                        02794000
  3946.        if index(message,'success')>0 then                               02795000
  3947.          Successful='1'                                                 02796000
  3948.        else                                                             02797000
  3949.          Successful='0'                                                 02798000
  3950.      end                                                                02799000
  3951.    else                                                                 02800000
  3952.      do                                                                 02801000
  3953.        Successful='0'                                                   02802000
  3954.        message='Your POSTing can not be sent. Please try again'         02803000
  3955.      end                                                                02804000
  3956. Return                                                                  02805000
  3957. /*-----------------------------------------------------------------*/   02806000
  3958. /* Routine to handle Mail                                          */   02807000
  3959. /*-----------------------------------------------------------------*/   02808000
  3960. Mail_Article:                                                           02809000
  3961.   if Successful then                                                    02810000
  3962.     do                                                                  02811000
  3963.       message='You have successfully sent your file! Please QUIT!'      02812000
  3964.       Return                                                            02813000
  3965.     end                                                                 02814000
  3966.    Address COMMAND 'DESBUF'                                             02815000
  3967.    Call GenHeaders                                                      02816000
  3968.    if pbrc=0 then                                                       02817000
  3969.      do                                                                 02818000
  3970.        header.=''                                                       02819000
  3971.        trailer.=''                                                      02820000
  3972.        trailer.1='.'                                                    02821000
  3973.        trailer.2='QUIT'                                                 02822000
  3974.        header.1='HELO '||thisnode                                       02823000
  3975.        header.2='MAIL FROM:<'||userid()||'@'||thisnode||'>'             02824000
  3976.        if index(NewHead.T,'(')>0 then                                   02825000
  3977.          rcptpart=word(NewHead.T,1)                                     02826000
  3978.        else if index(NewHead.T,'<')>0 then                              02827000
  3979.          parse var NewHead.T '<' rcptpart '>'                           02828000
  3980.        else if index(NewHead.T,'@')>0 then                              02829000
  3981.          do                                                             02830000
  3982.            do i=1 to words(NewHead.T)                                   02831000
  3983.              if index(word(NewHead.T,i),'@')>0 then                     02832000
  3984.                rcptpart=word(NewHead.T,i)                               02833000
  3985.            end                                                          02834000
  3986.          end                                                            02835000
  3987.        else if words(NewHead.T)=1 then                                  02836000
  3988.          rcptpart=NewHead.T                                             02837000
  3989.        else                                                             02838000
  3990.          do                                                             02839000
  3991.            message='In correct syntax for the "To:" header!'            02840000
  3992.            return                                                       02841000
  3993.          end                                                            02842000
  3994.        header.3='RCPT TO:<'||rcptpart||'>'                              02843000
  3995.        header.4='DATA'                                                  02844000
  3996.        Address COMMAND 'EXECIO 0 CP (STRING DEF 00D AS 02D'             02845000
  3997.        Address COMMAND 'EXECIO 0 CP (STRING DEF PUN AS 00D'             02846000
  3998.        Address COMMAND 'EXECIO 0 CP (STRING '||,                        02847000
  3999.                               'SPOOL 00D TO' MAILER 'CONT CLASS M'      02848000
  4000.        Address COMMAND 'EXECIO * PUNCH (STEM HEADER.'                   02849000
  4001.        Address COMMAND 'EXECIO * PUNCH (STEM POSTH.'                    02850000
  4002.        /* Double periods as per RFC 977 3.10.1 and  */                  02851000
  4003.        do i=1 to postb.0     /* RFC 821 4.5.2       */                  02852000
  4004.            if left(postb.i,1)='.' then                                  02853000
  4005.               Address COMMAND 'EXECIO 1 PUNCH (STRING' '.'postb.i       02854000
  4006.            else                                                         02855000
  4007.               Address COMMAND 'EXECIO 1 PUNCH (STRING' postb.i          02856000
  4008.        end                                                              02857000
  4009.        Address COMMAND 'EXECIO * PUNCH (STEM TRAILER.'                  02858000
  4010.        Address COMMAND 'EXECIO 0 CP (STRING CLOSE 00D NAME '||,         02859000
  4011.                userid()||' MAIL'                                        02860000
  4012.        Address COMMAND 'EXECIO 0 CP (STRING DETACH 00D'                 02861000
  4013.        Address COMMAND 'EXECIO 0 CP (STRING DEF 02D AS 00D'             02862000
  4014. /*     Address COMMAND 'ERASE VMNNTP' stamp     */                      02863000
  4015.        message='Mail Sent' NewHead.T                                    02864000
  4016.        Successful='1'                                                   02865000
  4017.      end                                                                02866000
  4018.    else                                                                 02867000
  4019.      do                                                                 02868000
  4020.        Successful='0'                                                   02869000
  4021.        message='Your MAILing can not be sent. Please try again'         02870000
  4022.      end                                                                02871000
  4023. Return                                                                  02872000
  4024. /*-----------------------------------------------------------------*/   02873000
  4025. /* Routine to generate headers for post and mail                   */   02874000
  4026. /*-----------------------------------------------------------------*/   02875000
  4027. GenHeaders:                                                             02876000
  4028. posth.=''                                                               02877000
  4029. if Flag='MAIL' | Flag='REPLY' | NewHead.N='' Then                       02878000
  4030.   do                                                                    02879000
  4031.     posth.0=6                                                           02880000
  4032.     posth.1='From:' NewHead.F                                           02881000
  4033.     posth.2='To:' NewHead.T                                             02882000
  4034.     posth.3='Subject:' NewHead.S                                        02883000
  4035.     posth.4='Date:' NewHead.D                                           02884000
  4036.     posth.5='Organization:' NewHead.O                                   02885000
  4037.     posth.6=' '                                                         02886000
  4038.   end                                                                   02887000
  4039. else                                                                    02888000
  4040.   do                                                                    02889000
  4041.     posth.0=7                                                           02890000
  4042.     if strip(NewHead.R)^='' then                                        02891000
  4043.       do                                                                02892000
  4044.         posth.0=8                                                       02893000
  4045.         posth.8='References:' NewHead.R                                 02894000
  4046.       end                                                               02895000
  4047.     posth.1='From:' NewHead.F                                           02896000
  4048.     posth.2='Path:' NewHead.P                                           02897000
  4049.     posth.3='Newsgroups:' NewHead.N                                     02898000
  4050.     posth.4='Subject:' NewHead.S                                        02899000
  4051.     posth.5='Message-ID:' NewHead.M                                     02900000
  4052.     posth.6='Date:' NewHead.D                                           02901000
  4053.     posth.7='Organization:' NewHead.O                                   02902000
  4054.   end                                                                   02903000
  4055. Return                                                                  02904000
  4056. NNR$HELP: Procedure                                                     02905000
  4057. /**---------------------------------------------------------------**/   02906000
  4058. /** Network News Reader                                           **/   02907000
  4059. /**                                                       Help    **/   02908000
  4060. /**---------------------------------------------------------------**/   02909000
  4061. arg screennum                                                           02910000
  4062. 'Extract /lscreen'                                                      02911000
  4063. 'Set msgline on' lscreen.1-3 '2 overlay'                                02912000
  4064. Address COMMAND 'GLOBALV SELECT VMNNTP'                                 02913000
  4065. Address COMMAND 'GLOBALV GET VERSION'                                   02914000
  4066. 'SET PF04 ONLY dummy'                                                   02915000
  4067. 'SET PF16 ONLY dummy'                                                   02916000
  4068. flag = 'HELP';                                                          02917000
  4069. message = '';                                                           02918000
  4070. start=screennum*18+1                                                    02919000
  4071. if screennum=0 then                                                     02920000
  4072.   scrheader='** PHLI/Main Screen'                                       02921000
  4073. else if screennum=1 then                                                02922000
  4074.   scrheader='** SHLI/Groups Screen'                                     02923000
  4075. else if screennum=2 then                                                02924000
  4076.   scrheader='** Headers Screen'                                         02925000
  4077. else if screennum=3 then                                                02926000
  4078.   scrheader='** Post(2) Screen'                                         02927000
  4079. else if screennum=4 then                                                02928000
  4080.   scrheader='** Post(1) Screen'                                         02929000
  4081. HELPSCR.=''                                                             02930000
  4082. Address COMMAND 'EXECIO 18 DISKR NNRHELP $XSCREEN *' start,             02931000
  4083.                          '(FINI STEM HELPSCR.'                          02932000
  4084. Address COMMAND 'DESBUF'                                                02933000
  4085. Do Forever;                                                             02934000
  4086.   Call HELPscreen;                  /* display main menu screen    */   02935000
  4087.   'Read Nochange Tag'                                                   02936000
  4088.   'Extract /cursor'                                                     02937000
  4089.   row = cursor.5; col = cursor.6;                                       02938000
  4090.   num=0                                                                 02939000
  4091.   Do While(Queued()>0)                                                  02940000
  4092.     num=num+1                                                           02941000
  4093.     Parse Pull QueuedLine.num                                           02942000
  4094.   end                                                                   02943000
  4095.   do i=1 to num                                                         02944000
  4096.     Parse var QueuedLine.i key line column string;                      02945000
  4097.     if key = "RES" Then Nop                                             02946000
  4098.     else SaveQueued=QueuedLine.i                                        02947000
  4099.   end                                                                   02948000
  4100.   Parse Var SaveQueued key line column string;                          02949000
  4101.   Select                                                                02950000
  4102.     When key = "CMD" Then Nop                                           02951000
  4103.     When key = "PFK" Then                                               02952000
  4104.       do                                                                02953000
  4105.         If Line=1 then Address COMMAND 'HELP CMS NNR'                   02954000
  4106.         else If Line=3 then call Return_Quit                            02955000
  4107.         else message='Unsupported PFK'                                  02956000
  4108.       end                                                               02957000
  4109.     When key = "ETK" Then Nop;                                          02958000
  4110.     otherwise Nop                                                       02959000
  4111.   End                                                                   02960000
  4112.   If flag='QUIT' then                                                   02961000
  4113.     leave                                                               02962000
  4114. End;  /* Do Forever */                                                  02963000
  4115. Return                                                                  02964000
  4116.                                                                         02965000
  4117. /*-----------------------------------------------------------------*/   02966000
  4118. /* Routine to display the main menu screen.                        */   02967000
  4119. /*-----------------------------------------------------------------*/   02968000
  4120. HELPscreen:                         /* set each line of the screen */   02969000
  4121.    'Set Reserved' 1 'noh' '29'x'!             ' '29'x'@',               02970000
  4122.                   center('*** NNR/VM ('||version||') ***',35),          02971000
  4123.                   right('Help',25),                                     02972000
  4124.                   '29'x'!                    '                          02973000
  4125.    'Set Reserved' 2 'noh' '29'x'@'||scrheader||'29'x'!'                 02974000
  4126.    Do i = 3 to 20                                                       02975000
  4127.      j=i-2                                                              02976000
  4128.      'Set Reserved' i 'noh' '29'x'!'Left(helpscr.j,78)'29'x'! '         02977000
  4129.                                                                         02978000
  4130.    End;                                                                 02979000
  4131.    Do i = 21 to lscreen.1-4;                                            02980000
  4132.      'Set Reserved' i 'noh'                                             02981000
  4133.    End;                                                                 02982000
  4134.    'Set Reserved' lscreen.1-3 'noh'                                     02983000
  4135.    'Set Reserved' lscreen.1-2 'high',                                   02984000
  4136.                                  ' 1= NNR_Help ',                       02985000
  4137.                                ||'2=          ',                        02986000
  4138.                                ||'3= Quit     ',                        02987000
  4139.                                ||' 4=          ',                       02988000
  4140.                                ||' 5=          ',                       02989000
  4141.                                ||' 6=         '                         02990000
  4142.    'Set Reserved' lscreen.1-1 'high',                                   02991000
  4143.                                  ' 7=          ',                       02992000
  4144.                                ||'8=          ',                        02993000
  4145.                                ||'9=          ',                        02994000
  4146.                                ||'10=          ',                       02995000
  4147.                                ||'11=          ',                       02996000
  4148.                                ||'12=         '                         02997000
  4149.    If message ^= "" Then                                                02998000
  4150.       Do;                                                               02999000
  4151.          'EMSG' message                                                 03000000
  4152.          message = '';                                                  03001000
  4153.       End;                                                              03002000
  4154.    'Cursor screen' 15 4                                                 03003000
  4155. Return;                                                                 03004000
  4156. /**********************************************************************/03005000
  4157. /* compress bit representation of articles read                       */03006000
  4158. /**********************************************************************/03007000
  4159. compress_log: procedure                                                 03008000
  4160. parse arg pattern                                                       03009000
  4161. bin=''                                                                  03010000
  4162. Pattern=left(pattern||'11111111',((length(pattern)+8)%8)*8)             03011000
  4163. do i=1 to length(pattern) by 4                                          03012000
  4164.   bin=bin||b2h(substr(pattern,i,4))                                     03013000
  4165. end                                                                     03014000
  4166. return(x2c(bin))                                                        03015000
  4167. /**********************************************************************/03016000
  4168. /* expand bit representation of articles read                         */03017000
  4169. /**********************************************************************/03018000
  4170. expand_log: procedure                                                   03019000
  4171. parse arg bin                                                           03020000
  4172. bin=c2x(bin)                                                            03021000
  4173. pattern=''                                                              03022000
  4174. do i=1 to length(bin)                                                   03023000
  4175.   pattern=pattern||h2b(substr(bin,i,1))                                 03024000
  4176. end                                                                     03025000
  4177. return(pattern)                                                         03026000
  4178. /**********************************************************************/03027000
  4179. /* map bit representation of articles read                            */03028000
  4180. /**********************************************************************/03029000
  4181. Map_Log: procedure expose frst_act log ext_log                          03030000
  4182. parse arg article                                                       03031000
  4183. ext_log=overlay('1',ext_log,article-frst_act+1)                         03032000
  4184. return(substr(log,article-frst_act+1,1))                                03033000
  4185. /**********************************************************************/03034000
  4186. /* Build representation of articles read                              */03035000
  4187. /**********************************************************************/03036000
  4188. BldNewLog: procedure expose ext_log prfx.                               03037000
  4189. parse arg log                                                           03038000
  4190. ptr=0                                                                   03039000
  4191. do i=1 to length(log)                                                   03040000
  4192.   if substr(ext_log,i,1) then                                           03041000
  4193.     do                                                                  03042000
  4194.       ptr=ptr+1                                                         03043000
  4195.       if prfx.ptr='*' then                                              03044000
  4196.         log=overlay('1',log,i)                                          03045000
  4197.       else                                                              03046000
  4198.         log=overlay('0',log,i)                                          03047000
  4199.     end                                                                 03048000
  4200.   else                                                                  03049000
  4201.     do                                                                  03050000
  4202.       log=overlay('1',log,i)                                            03051000
  4203.     end                                                                 03052000
  4204. end                                                                     03053000
  4205. if ptr^=prfx.0 then say 'something is wrong with the build new log!'    03054000
  4206. return(log)                                                             03055000
  4207. /**********************************************************************/03056000
  4208. /* convert from hex to binary                                         */03057000
  4209. /**********************************************************************/03058000
  4210. h2b: procedure                                                          03059000
  4211. arg hex                                                                 03060000
  4212.  select                                                                 03061000
  4213.   when hex='0' then return('0000')                                      03062000
  4214.   when hex='1' then return('0001')                                      03063000
  4215.   when hex='2' then return('0010')                                      03064000
  4216.   when hex='3' then return('0011')                                      03065000
  4217.   when hex='4' then return('0100')                                      03066000
  4218.   when hex='5' then return('0101')                                      03067000
  4219.   when hex='6' then return('0110')                                      03068000
  4220.   when hex='7' then return('0111')                                      03069000
  4221.   when hex='8' then return('1000')                                      03070000
  4222.   when hex='9' then return('1001')                                      03071000
  4223.   when hex='A' then return('1010')                                      03072000
  4224.   when hex='B' then return('1011')                                      03073000
  4225.   when hex='C' then return('1100')                                      03074000
  4226.   when hex='D' then return('1101')                                      03075000
  4227.   when hex='E' then return('1110')                                      03076000
  4228.   when hex='F' then return('1111')                                      03077000
  4229.   otherwise                                                             03078000
  4230.     say 'Oops! error in logic!'                                         03079000
  4231. end                                                                     03080000
  4232. return(-1)                                                              03081000
  4233. /**********************************************************************/03082000
  4234. /* convert form binary to hex                                         */03083000
  4235. /**********************************************************************/03084000
  4236. b2h: procedure                                                          03085000
  4237. arg bin                                                                 03086000
  4238.  select                                                                 03087000
  4239.   when bin='0000' then return('0')                                      03088000
  4240.   when bin='0001' then return('1')                                      03089000
  4241.   when bin='0010' then return('2')                                      03090000
  4242.   when bin='0011' then return('3')                                      03091000
  4243.   when bin='0100' then return('4')                                      03092000
  4244.   when bin='0101' then return('5')                                      03093000
  4245.   when bin='0110' then return('6')                                      03094000
  4246.   when bin='0111' then return('7')                                      03095000
  4247.   when bin='1000' then return('8')                                      03096000
  4248.   when bin='1001' then return('9')                                      03097000
  4249.   when bin='1010' then return('A')                                      03098000
  4250.   when bin='1011' then return('B')                                      03099000
  4251.   when bin='1100' then return('C')                                      03100000
  4252.   when bin='1101' then return('D')                                      03101000
  4253.   when bin='1110' then return('E')                                      03102000
  4254.   when bin='1111' then return('F')                                      03103000
  4255.   otherwise                                                             03104000
  4256.     say 'Oops! error in logic!'                                         03105000
  4257. end                                                                     03106000
  4258. return(-1)                                                              03107000
  4259. /**********************************************************************/03108000
  4260. /* adjust bit representation of articles read in.                     */03109000
  4261. /**********************************************************************/03110000
  4262. adjust_inlog: procedure expose frst_rem last_rem frst_act last_act      03111000
  4263. parse arg log                                                           03112000
  4264. if log='' |,                                                            03113000
  4265.     frst_rem='' |,                                                      03114000
  4266.      verify(frst_rem,'1234567890')>0 |,                                 03115000
  4267.       last_rem='' |,                                                    03116000
  4268.        verify(last_rem,'1234567890')>0  then                            03117000
  4269.   do                                                                    03118000
  4270.     /* create log (always for ext_log)                             */   03119000
  4271.     articles=last_act-frst_act+1                                        03120000
  4272.     log=copies('0',articles)                                            03121000
  4273.     frst_rem=frst_act                                                   03122000
  4274.     last_rem=last_act                                                   03123000
  4275.     return(log)                                                         03124000
  4276.   end                                                                   03125000
  4277. /* ensure log is in synch with first and last remembered articles  */   03126000
  4278. if last_rem-frst_rem+1 < length(log) then                               03127000
  4279.   log=substr(log,1,last_rem-frst_rem+1)                                 03128000
  4280. else                                                                    03129000
  4281.   log=''                                                                03130000
  4282.                                                                         03131000
  4283. if frst_rem>frst_act then                                               03132000
  4284.   do                                                                    03133000
  4285.     diff=frst_rem-frst_act                                              03134000
  4286.     log=copies('1',diff)||log                                           03135000
  4287.     articles=last_act-frst_act+1                                        03136000
  4288.     log=left(log,articles,'0')                                          03137000
  4289.     frst_rem=frst_act                                                   03138000
  4290.     last_rem=last_act                                                   03139000
  4291.   end                                                                   03140000
  4292. else if frst_rem<frst_act then                                          03141000
  4293.   do                                                                    03142000
  4294.     /* this could easily happen over time and with articles:       */   03143000
  4295.     diff=frst_act-frst_rem+1                                            03144000
  4296.     articles=last_act-frst_act+1                                        03145000
  4297.     log=substr(log,diff)                                                03146000
  4298.     log=left(log,articles,'0')                                          03147000
  4299.     frst_rem=frst_act                                                   03148000
  4300.     last_rem=last_act                                                   03149000
  4301.   end                                                                   03150000
  4302. else                                                                    03151000
  4303.   do                                                                    03152000
  4304.     articles=last_act-frst_act+1                                        03153000
  4305.     if articles<0 then articles=0  /* Sigh.  It happened.  */           03154000
  4306.     log=left(log,articles,'0')                                          03155000
  4307.     frst_rem=frst_act                                                   03156000
  4308.     last_rem=last_act                                                   03157000
  4309.   end                                                                   03158000
  4310. return(log)                                                             03159000
  4311. /**********************************************************************/03160000
  4312. /* adjust bit representation of articles written out.                 */03161000
  4313. /**********************************************************************/03162000
  4314. adjust_outlog: procedure expose frst_rem last_rem ext_log               03163000
  4315. parse arg log                                                           03164000
  4316. /* forward trim */                                                      03165000
  4317. ptr=verify(log,'1')                                                     03166000
  4318. if ptr = 1 then                                                         03167000
  4319.   nop                                                                   03168000
  4320. else if ptr > 1 then                                                    03169000
  4321.   do                                                                    03170000
  4322.     frst_rem=frst_rem+ptr-1                                             03171000
  4323.     log=substr(log,ptr)                                                 03172000
  4324.   end                                                                   03173000
  4325. else                                                                    03174000
  4326.   do                                                                    03175000
  4327.     frst_rem=last_rem                                                   03176000
  4328.     log=''                                                              03177000
  4329.   end                                                                   03178000
  4330. /* backward trim */                                                     03179000
  4331. if log ^= '' then                                                       03180000
  4332.   do                                                                    03181000
  4333.     ptr=verify(reverse(clean_log(log)),'0')                             03182000
  4334.     if ptr = 1 then                                                     03183000
  4335.       nop                                                               03184000
  4336.     else if ptr > 1 then                                                03185000
  4337.       do                                                                03186000
  4338.         last_rem=last_rem-ptr+1                                         03187000
  4339.         log=substr(log,1,length(log)-ptr+1)                             03188000
  4340.       end                                                               03189000
  4341.     else                                                                03190000
  4342.       do                                                                03191000
  4343.         last_rem=frst_rem                                               03192000
  4344.         log='0'                                                         03193000
  4345.       end                                                               03194000
  4346.   end                                                                   03195000
  4347. return(log)                                                             03196000
  4348. /**********************************************************************/03197000
  4349. /* count articles available, remembered range only                    */03198000
  4350. /**********************************************************************/03199000
  4351. Count_Log: procedure                                                    03200000
  4352. parse arg article_log                                                   03201000
  4353. parse var article_log frst_rem last_rem '$' log '$*$' .                 03202000
  4354. count=0                                                                 03203000
  4355. log=expand_log(log)                                                     03204000
  4356. do i=1 to length(log)                                                   03205000
  4357.   if ^substr(log,i,1) then                                              03206000
  4358.     count=count+1                                                       03207000
  4359. end                                                                     03208000
  4360. return(count)                                                           03209000
  4361. /**********************************************************************/03210000
  4362. /* Clear representation of nonexistant articles                       */03211000
  4363. /* ** trade off between accurate count and amount of space            */03212000
  4364. /**********************************************************************/03213000
  4365. Clean_Log: procedure expose ext_log                                     03214000
  4366. parse arg log                                                           03215000
  4367. if ext_log='' then return(log)                                          03216000
  4368. ptr=0                                                                   03217000
  4369. do i=1 to length(log)                                                   03218000
  4370.   if ^substr(ext_log,i,1) then                                          03219000
  4371.       log=overlay('0',log,i)                                            03220000
  4372. end                                                                     03221000
  4373. return(log)                                                             03222000
  4374. /**********************************************************************/03223000
  4375. /*   Initialize RXSOCKET                                              */03224000
  4376. /**********************************************************************/03225000
  4377. RXInital:Procedure expose socket                                        03226000
  4378. parse arg args                                                          03227000
  4379.   if Socket('Initialize', 'NNTPConn') = '-1' Then                       03228000
  4380.     Return('-1 INITIALIZE '||errno)                                     03229000
  4381.   socket  = Socket('Socket', 'AF_INET', 'Sock_Stream')                  03230000
  4382.   If socket="-1" Then                                                   03231000
  4383.     Return('-1 SOCKET '||errno)                                         03232000
  4384.   'GLOBALV SETL SOCKET' socket                                          03233000
  4385. /*name = AF_INET||Htons(119)||Socket('GetHostByName',word(args,1))*/    03234000
  4386.   name = AF_INET||Htons(119)||Inet_Addr(word(args,1))                   03235000
  4387.   rc = Socket('Connect', socket, name)                                  03236000
  4388.   If rc="-1" Then                                                       03237000
  4389.     Return('-1 CONNECT '||errno)                                        03238000
  4390.   status=STATUS_Response('')                                            03239000
  4391. Return(status)                                                          03240000
  4392. /**********************************************************************/03241000
  4393. /*   Terminate NEWS Session                                           */03242000
  4394. /**********************************************************************/03243000
  4395. RXTermin:Procedure expose socket                                        03244000
  4396.   If Socket('Close', socket) = '-1' Then                                03245000
  4397.     Say 'CLOSE '||errno                                                 03246000
  4398.   If Socket('Terminate', 'NNTPConn') = '-1' Then                        03247000
  4399.     Return('-1 TERMINATE '||errno)                                      03248000
  4400. Return(0)                                                               03249000
  4401. /**********************************************************************/03250000
  4402. /*   QUIT the server                                                  */03251000
  4403. /**********************************************************************/03252000
  4404. NEWSQuit:Procedure expose socket                                        03253000
  4405.   status=STATUS_Response('QUIT')                                        03254000
  4406. Return(Status)                                                          03255000
  4407. /**********************************************************************/03256000
  4408. /*   Check Status Response (ends with cr lf)                          */03257000
  4409. /**********************************************************************/03258000
  4410. STATUS_Response: procedure expose socket line                           03259000
  4411. parse arg command                                                       03260000
  4412.   status=0                                                              03261000
  4413.   if command ^='' then                                                  03262000
  4414.     status=NEWS_Command(command)                                        03263000
  4415.   If word(Status,1)^='-1' Then                                          03264000
  4416.     do                                                                  03265000
  4417.       line = ""                                                         03266000
  4418.       pattern='0D0A'x                                                   03267000
  4419.       Do Forever                                                        03268000
  4420.         bytes_in = Socket('Read', socket, 'data')                       03269000
  4421.         If bytes_in="-1" Then Return('-1 READ '||errno)                 03270000
  4422.         line = line || data                                             03271000
  4423.         If bytes_in=0 | index(line,pattern)>0 then                      03272000
  4424.         Leave                                                           03273000
  4425.       End                                                               03274000
  4426.       Parse Var line data '0D0A'x .                                     03275000
  4427.       Status=A2E(data)                                                  03276000
  4428.     End                                                                 03277000
  4429. Return(status)                                                          03278000
  4430. /**********************************************************************/03279000
  4431. /*   Check TEXT Response (ends with a .)                              */03280000
  4432. /**********************************************************************/03281000
  4433. TEXT_Response: procedure expose socket line                             03282000
  4434. parse arg command                                                       03283000
  4435.   Address COMMAND 'GLOBALV GET LINES'                                   03284000
  4436.   status=NEWS_Command(command)                                          03285000
  4437.   If word(Status,1)^='-1' Then                                          03286000
  4438.     do                                                                  03287000
  4439.       status=0                                                          03288000
  4440.       total=0                                                           03289000
  4441.       line = ""                                                         03290000
  4442.       pattern='0D0A'x||E2A('.')||'0D0A'x                                03291000
  4443.       Do Forever                                                        03292000
  4444.         bytes_in = Socket('Read', socket, 'data')                       03293000
  4445.         If bytes_in="-1" Then Return('-1 READ '||errno)                 03294000
  4446.         /*                                                              03295000
  4447.          the idea behind line_count is to more accurately assess        03296000
  4448.          the line limit. we add 5 for latitude, (nnr$arti) will         03297000
  4449.          pick off the 1 or 2 lines extra. remember -1 for status        03298000
  4450.          line and -1 for '.'. we will also be off by +-1 because of     03299000
  4451.          the way line_count is calculated (words-1). we want to avoid   03300000
  4452.          the situation where we approach the limit and append as much   03301000
  4453.          as 8k which can "exhaust virtual storage".                     03302000
  4454.         */                                                              03303000
  4455.         if lines+5 > total then                                         03304000
  4456.           do                                                            03305000
  4457.             line_count=words(translate(data,'$ ','400A'x))-1            03306000
  4458.             if lines+5 > total+line_count then                          03307000
  4459.               line = line || data                                       03308000
  4460.             else                                                        03309000
  4461.               do                                                        03310000
  4462.                 i=lines+4-total                                         03311000
  4463.                 if i<line_count then                                    03312000
  4464.                   do                                                    03313000
  4465.                     i=wordindex(translate(data,'$ ','400A'x),i)         03314000
  4466.                     line = line || substr(data,1,i-1)                   03315000
  4467.                   end                                                   03316000
  4468.                 else                                                    03317000
  4469.                   line = line || data                                   03318000
  4470.               end                                                       03319000
  4471.             total=total+line_count                                      03320000
  4472.             test=right(line||data,5)                                    03321000
  4473.             prevdata=test                                               03322000
  4474.           end                                                           03323000
  4475.         else /* exceeded number of lines (approx.) */                   03324000
  4476.           do                                                            03325000
  4477.             test=right(prevdata||data,5)                                03326000
  4478.             prevdata=test                                               03327000
  4479.           end                                                           03328000
  4480.         If bytes_in=0 | index(test,pattern)>0 then                      03329000
  4481.         Leave                                                           03330000
  4482.       End                                                               03331000
  4483.     End                                                                 03332000
  4484. Return(status)                                                          03333000
  4485. /**********************************************************************/03334000
  4486. NEWS_Command:Procedure expose socket                                    03335000
  4487. parse arg command                                                       03336000
  4488.   data = E2A(command) || '0D0A'x                                        03337000
  4489.   bytes_out = Socket('Write', socket, data)                             03338000
  4490.   If bytes_out="-1" Then Return('-1 WRITE '||errno)                     03339000
  4491. Return(0)                                                               03340000
  4492. /**********************************************************************/03341000
  4493. /*   Check Status                                                     */03342000
  4494. /**********************************************************************/03343000
  4495. Check_Status:Procedure expose line                                      03344000
  4496.   Parse Var line data '0D0A'x line                                      03345000
  4497. Return(A2E(data))                                                       03346000
  4498. /**********************************************************************/03347000
  4499. /*   Split Response Buffer (for articles)                             */03348000
  4500. /**********************************************************************/03349000
  4501. Split_Article:Procedure expose line                                     03350000
  4502. Address COMMAND 'GLOBALV GET LINES'                                     03351000
  4503.   Do i=1 to lines+1                                                     03352000
  4504.     If line="" Then Leave                                               03353000
  4505.     Parse Var line data '0D0A'x line                                    03354000
  4506.     do while (length(data)>249)                                         03355000
  4507.       Queue left(A2E(data),249)||'FF'x                                  03356000
  4508.       data=substr(data,250)                                             03357000
  4509.       i=i+1                                                             03358000
  4510.     End                                                                 03359000
  4511.     Queue left(A2E(data),max(1,length(data)))                           03360000
  4512.   End                                                                   03361000
  4513. Return                                                                  03362000
  4514. /**********************************************************************/03363000
  4515. /*   Split Response Buffer                                            */03364000
  4516. /**********************************************************************/03365000
  4517. Split_Response:Procedure expose line item.                              03366000
  4518.   item.=''                                                              03367000
  4519.   i=0                                                                   03368000
  4520.   Do Forever                                                            03369000
  4521.     If line="" Then Leave                                               03370000
  4522.     Parse Var line data '0D0A'x line                                    03371000
  4523.     i=i+1                                                               03372000
  4524.     item.i=A2E(data)                                                    03373000
  4525.   End                                                                   03374000
  4526.   item.i=''                                                             03375000
  4527.   item.0=i-1                                                            03376000
  4528. Return                                                                  03377000
  4529. /**********************************************************************/03378000
  4530. /*   Get Subject                                                      */03379000
  4531. /**********************************************************************/03380000
  4532. Get_Subject:Procedure expose socket                                     03381000
  4533. parse arg range                                                         03382000
  4534.   status=TEXT_Response('XHDR subject' range'-'range)                    03383000
  4535.   If word(status,1)='-1' Then Return(Status)                            03384000
  4536.   Status=Check_Status()                                                 03385000
  4537.   if word(Status,1)='221' then                                          03386000
  4538.     do                                                                  03387000
  4539.       Call Split_Response                                               03388000
  4540.       Return(item.1)                                                    03389000
  4541.     End                                                                 03390000
  4542. Return(Status)                                                          03391000
  4543. /**********************************************************************/03392000
  4544. /*   Get the LIST of Groups                                           */03393000
  4545. /**********************************************************************/03394000
  4546. NEWSList:Procedure expose socket list.                                  03395000
  4547.   status=LISTNGRP_Response('LIST')                                      03396000
  4548.   If word(status,1)^='-1' Then                                          03397000
  4549.     Status=Check_Status()                                               03398000
  4550.   if word(Status,1)='215' then                                          03399000
  4551.     do                                                                  03400000
  4552.       i=0                                                               03401000
  4553.       Do Forever                                                        03402000
  4554.         If line="" Then Leave                                           03403000
  4555.         Parse Var line data '0D0A'x line                                03404000
  4556.         i=i+1                                                           03405000
  4557.         list.i=A2E(data)                                                03406000
  4558.       End                                                               03407000
  4559.       list.i=''                                                         03408000
  4560.       list.0=i-1                                                        03409000
  4561.     end                                                                 03410000
  4562. Return(Status)                                                          03411000
  4563. /**********************************************************************/03412000
  4564. /*   POST article                                                     */03413000
  4565. /**********************************************************************/03414000
  4566. NEWSPost:Procedure expose socket posth. postb.                          03415000
  4567.   status=STATUS_Response('POST')                                        03416000
  4568.   if word(Status,1)='340' then                                          03417000
  4569.     do                                                                  03418000
  4570.       data=''                                                           03419000
  4571.       do i=1 to posth.0                                                 03420000
  4572.         data=data||E2A(posth.i)||'0D0A'x                                03421000
  4573.       end                                                               03422000
  4574.       If Socket('Write', socket, data||'0D0A'x)='-1' Then               03423000
  4575.         Return('-1 WRITE '||errno)                                      03424000
  4576.         /* Double periods as per RFC 977 3.10.1 and  */                 03425000
  4577.       do i=1 to postb.0       /* RFC 821 4.5.2       */                 03426000
  4578.         if left(postb.i,1)='.' then                                     03427000
  4579.           data=E2A('.'||postb.i)||'0D0A'x                               03428000
  4580.         else                                                            03429000
  4581.           data=E2A(postb.i)||'0D0A'x                                    03430000
  4582.         If Socket('Write', socket, data)='-1' Then                      03431000
  4583.           Return('-1 WRITE '||errno)                                    03432000
  4584.       end                                                               03433000
  4585.       data=E2A('.')||'0D0A'x                                            03434000
  4586.       If Socket('Write', socket, data)='-1' Then                        03435000
  4587.         Return('-1 WRITE '||errno)                                      03436000
  4588.       status=STATUS_Response('')                                        03437000
  4589.     end                                                                 03438000
  4590. Return(Status)                                                          03439000
  4591. /**********************************************************************/03440000
  4592. /*   Get the HEADERS for a group                                      */03441000
  4593. /**********************************************************************/03442000
  4594. NEWSXHDR:Procedure expose socket                                        03443000
  4595. Address COMMAND 'GLOBALV GET XHEADER1'                                  03444000
  4596. Address COMMAND 'GLOBALV GET XHEADER2'                                  03445000
  4597. parse arg count start_article group newnews                             03446000
  4598.   status=STATUS_Response('GROUP '||group)                               03447000
  4599.   if word(Status,1)='211' then                                          03448000
  4600.     do                                                                  03449000
  4601.       parse var status . articles first_article last_article .          03450000
  4602.       If articles > 0 then                                              03451000
  4603.         do                                                              03452000
  4604.           if newnews then                                               03453000
  4605.             do                                                          03454000
  4606.               Status=STATUS_Response('STAT '||start_article)            03455000
  4607.               if word(Status,1)='223' then                              03456000
  4608.                 do                                                      03457000
  4609.                   Status=STATUS_Response('NEXT')                        03458000
  4610.                   if word(Status,1)^='223' then Return(0)               03459000
  4611.                   start_article=word(Status,2)                          03460000
  4612.                 end                                                     03461000
  4613.             end                                                         03462000
  4614.           first_article=start_article                                   03463000
  4615.           count=count-1                                                 03464000
  4616.           if count<last_article-first_article then                      03465000
  4617.             do                                                          03466000
  4618.               first_article=last_article-count                          03467000
  4619.               range=first_article||'-'||last_article                    03468000
  4620.             end                                                         03469000
  4621.           else                                                          03470000
  4622.             range=first_article||'-'||last_article                      03471000
  4623.           temp.=''                                               /*stk*/03472000
  4624.           Status=GetXHeader(range xheader1)                      /*stk*/03473000
  4625.           If word(status,1)='-1' Then Return(Status)             /*stk*/03474000
  4626.           Status=GetXHeader(range xheader2)                      /*stk*/03475000
  4627.           If word(status,1)='-1' Then Return(Status)             /*stk*/03476000
  4628.           if word(Status,1)='221' then                                  03477000
  4629.             do                                                   /*stk*/03478000
  4630.               do i=1 to item.0                                   /*stk*/03479000
  4631.                 Queue word(item.i,1) strip(substr(temp.i,2),'T') /*stk*/03480000
  4632.               end                                                       03481000
  4633.               Push group first_article last_article                     03482000
  4634.               Queue '.'                                                 03483000
  4635.               status=0                                                  03484000
  4636.             end                                                         03485000
  4637.           drop temp.                                             /*stk*/03486000
  4638.         End                                                             03487000
  4639.       Else                                                              03488000
  4640.         Return(0)                                                       03489000
  4641.     End                                                                 03490000
  4642. Return(Status)                                                          03491000
  4643.                                                                  /*stk*/03492000
  4644. /**********************************************************************/03493000
  4645. /*   Get the article titles -- append to temp array                   */03494000
  4646. /**********************************************************************/03495000
  4647. GetXHeader:                                                      /*stk*/03496000
  4648.     parse arg frange workhead                                    /*stk*/03497000
  4649.     delim='4a'x                                                  /*stk*/03498000
  4650.     do HeaderItem = 1 while workhead<>''                         /*stk*/03499000
  4651.         parse value workhead with fhd fwid workhead              /*stk*/03500000
  4652.         if fhd='(ArticleNumber)' then xhd = 'Subject'            /*stk*/03501000
  4653.                            else xhd = fhd                        /*stk*/03502000
  4654.         status=TEXT_Response('XHDR' xhd frange)                  /*stk*/03503000
  4655.         If word(status,1)='-1' Then Return(Status)               /*stk*/03504000
  4656.         Status=Check_Status()                                    /*stk*/03505000
  4657.         if word(Status,1)='221' then                             /*stk*/03506000
  4658.           do                                                     /*stk*/03507000
  4659.             call Split_Response                                  /*stk*/03508000
  4660.             do i=1 to item.0                                     /*stk*/03509000
  4661.               temphead = subword(item.i,2)                       /*stk*/03510000
  4662.               if fhd='(ArticleNumber)' then                      /*stk*/03511000
  4663.                   temphead = right(word(item.i,1),fwid)          /*stk*/03512000
  4664.               temphead = translate(temphead,'&&','4a29'x)        /*stk*/03513000
  4665.               temp.i=temp.i||delim||left(temphead,fwid)          /*stk*/03514000
  4666.             end                                                  /*stk*/03515000
  4667.           end                                                    /*stk*/03516000
  4668.         delim = ' '                                              /*stk*/03517000
  4669.         end HeaderItem                                           /*stk*/03518000
  4670.     return(STatus)                                               /*stk*/03519000
  4671.                                                                  /*stk*/03520000
  4672.                                                                  /*stk*/03521000
  4673. /**********************************************************************/03522000
  4674. /*   Get the LIST of New Groups                                       */03523000
  4675. /**********************************************************************/03524000
  4676. NEWSNewG:Procedure expose socket item.                                  03525000
  4677. parse arg hhmmss yymmdd                                                 03526000
  4678.   status=TEXT_Response('NEWGROUPS ' yymmdd hhmmss)                      03527000
  4679.   If word(status,1)^='-1' Then                                          03528000
  4680.     Status=Check_Status()                                               03529000
  4681.   If word(status,1)='231' Then                                          03530000
  4682.     Call Split_Response                                                 03531000
  4683. Return(Status)                                                          03532000
  4684. /**********************************************************************/03533000
  4685. /*   Check LIST and NEWGROUPS commands (status + text response)       */03534000
  4686. /**********************************************************************/03535000
  4687. LISTNGRP_Response: procedure expose socket line                         03536000
  4688. parse arg command                                                       03537000
  4689.   status=NEWS_Command(command)                                          03538000
  4690.   If word(Status,1)^='-1' Then                                          03539000
  4691.     do                                                                  03540000
  4692.       status=0                                                          03541000
  4693.       line = ""                                                         03542000
  4694.       pattern='0D0A'x                                                   03543000
  4695.       Do Forever                                                        03544000
  4696.         bytes_in = Socket('Read', socket, 'data')                       03545000
  4697.         If bytes_in="-1" Then Return('-1 READ '||errno)                 03546000
  4698.         line = line || data                                             03547000
  4699.         If bytes_in=0 | index(line,pattern)>0 then                      03548000
  4700.         Leave                                                           03549000
  4701.       End                                                               03550000
  4702.       Parse Var line status '0D0A'x .                                   03551000
  4703.       Status=A2E(status)                                                03552000
  4704.       If word(Status,1)^='231' & word(Status,1)^='215' Then             03553000
  4705.         Return(status)                                                  03554000
  4706.       pattern='0D0A'x||E2A('.')||'0D0A'x                                03555000
  4707.       If index(line,pattern)>0 then                                     03556000
  4708.         Return(status)                                                  03557000
  4709.       prevdata=data                                                     03558000
  4710.       Do Forever                                                        03559000
  4711.         bytes_in = Socket('Read', socket, 'data')                       03560000
  4712.         If bytes_in="-1" Then Return('-1 READ '||errno)                 03561000
  4713.         line = line || data                                             03562000
  4714.         test=right(line,5)                                              03563000
  4715.         prevdata=data                                                   03564000
  4716.         If bytes_in=0 | index(test,pattern)>0 then                      03565000
  4717.         Leave                                                           03566000
  4718.       End                                                               03567000
  4719.     End                                                                 03568000
  4720. Return(status)                                                          03569000
  4721. /**********************************************************************/03570000
  4722. /*   Get Selected articles                                            */03571000
  4723. /**********************************************************************/03572000
  4724. NEWSSeleS:Procedure expose socket Selected_Articles.                    03573000
  4725. parse arg action group start_article newnews                            03574000
  4726.   status=STATUS_Response('GROUP '||group)                               03575000
  4727.   if word(Status,1)='211' then                                          03576000
  4728.     do                                                                  03577000
  4729.       parse var status . articles first_article last_article .          03578000
  4730.       If articles > 0 then                                              03579000
  4731.         do                                                              03580000
  4732.           do i=1 to Selected_Articles.0                                 03581000
  4733.             if Start_Article=word(Selected_Articles.i,1) then           03582000
  4734.               do                                                        03583000
  4735.                 ptr=i                                                   03584000
  4736.                 leave                                                   03585000
  4737.               end                                                       03586000
  4738.           end                                                           03587000
  4739.           Address COMMAND 'GLOBALV GET FARTICLE'                        03588000
  4740.           Address COMMAND 'GLOBALV GET LARTICLE'                        03589000
  4741.           if FArticle=0 then                                            03590000
  4742.             do                                                          03591000
  4743.               FArticle=ptr                                              03592000
  4744.               LArticle=ptr                                              03593000
  4745.             end                                                         03594000
  4746.           SaveArticle=word(Selected_Articles.ptr,1)                     03595000
  4747.           do while ((ptr > 0) & (ptr <= Selected_Articles.0))           03596000
  4748.             if SaveArticle < Selected_Articles.ptr then                 03597000
  4749.               SaveArticle=word(Selected_Articles.ptr,1)                 03598000
  4750.             if LArticle < ptr then LArticle=ptr                         03599000
  4751.             if FArticle > ptr then FArticle=ptr                         03600000
  4752.             Address COMMAND 'GLOBALV SET HEADERS' Action                03601000
  4753.             Address COMMAND 'GLOBALV SETL SUBJECT',                     03602000
  4754.                              Get_Subject(word(Selected_Articles.ptr,1)) 03603000
  4755.             status=TEXT_Response(Action word(Selected_Articles.ptr,1))  03604000
  4756.             If word(status,1)='-1' Then Return(Status)                  03605000
  4757.             Status=Check_Status()                                       03606000
  4758.             Call Split_Article                                          03607000
  4759.             Push group                                                  03608000
  4760.             Address COMMAND 'XEDIT $A$R$T$I XEDIT S',                   03609000
  4761.                             '(PROFILE NNR$ARTI WIDTH 300'               03610000
  4762.             Pull command                                                03611000
  4763.             if index('QUIT POST',command) > 0 then ptr=0                03612000
  4764.             else if command='NEXT' then ptr=ptr+1                       03613000
  4765.             else if command='LAST' then ptr=ptr-1                       03614000
  4766.             else if command='HEADBODY' then                             03615000
  4767.               do                                                        03616000
  4768.                 if Action='ARTICLE' then Action='BODY'                  03617000
  4769.                 else Action='ARTICLE'                                   03618000
  4770.               end                                                       03619000
  4771.           end                                                           03620000
  4772.           if index('POST',command) > 0 then                             03621000
  4773.             do                                                          03622000
  4774.               Address COMMAND 'GLOBALV SET ARTICLE' word(Status,2)      03623000
  4775.               Address COMMAND 'GLOBALV SET POSTING' 1                   03624000
  4776.               status=TEXT_Response('HEAD ' word(Status,2))              03625000
  4777.               If word(status,1)='-1' Then Return(Status)                03626000
  4778.               Status=Check_Status()                                     03627000
  4779.               Call Split_Article                                        03628000
  4780.             end                                                         03629000
  4781.           else                                                          03630000
  4782.             do                                                          03631000
  4783.               Address COMMAND 'GLOBALV SET ARTICLE' SaveArticle         03632000
  4784.             end                                                         03633000
  4785.           Address COMMAND 'GLOBALV SET FARTICLE' FArticle               03634000
  4786.           Address COMMAND 'GLOBALV SET LARTICLE' LArticle               03635000
  4787.           Address COMMAND 'GLOBALV SET HEADERS' Action                  03636000
  4788.           Status=0                                                      03637000
  4789.         End                                                             03638000
  4790.       Else                                                              03639000
  4791.         Return(0) /* no articles */                                     03640000
  4792.     End                                                                 03641000
  4793. Return(Status)                                                          03642000
  4794. /**********************************************************************/03643000
  4795. /*   Get Selected articles                                            */03644000
  4796. /**********************************************************************/03645000
  4797. NEWSSeleI:Procedure expose socket item.                                 03646000
  4798. parse arg action group start_article newnews                            03647000
  4799.   status=STATUS_Response('GROUP '||group)                               03648000
  4800.   if word(Status,1)='211' then                                          03649000
  4801.     do                                                                  03650000
  4802.       parse var status . articles first_article last_article .          03651000
  4803.       If articles > 0 then                                              03652000
  4804.         do                                                              03653000
  4805.           do i=1 to item.0                                              03654000
  4806.             if Start_Article=word(item.i,1) then                        03655000
  4807.               do                                                        03656000
  4808.                 ptr=i                                                   03657000
  4809.                 leave                                                   03658000
  4810.               end                                                       03659000
  4811.           end                                                           03660000
  4812.           Address COMMAND 'GLOBALV GET FARTICLE'                        03661000
  4813.           Address COMMAND 'GLOBALV GET LARTICLE'                        03662000
  4814.           if FArticle=0 then                                            03663000
  4815.             do                                                          03664000
  4816.               FArticle=ptr                                              03665000
  4817.               LArticle=ptr                                              03666000
  4818.             end                                                         03667000
  4819.           SaveArticle=word(item.ptr,1)                                  03668000
  4820.           do while ((ptr > 0) & (ptr <= item.0))                        03669000
  4821.             if SaveArticle < item.ptr then SaveArticle=word(item.ptr,1) 03670000
  4822.             if LArticle < ptr then LArticle=ptr                         03671000
  4823.             if FArticle > ptr then FArticle=ptr                         03672000
  4824.             Address COMMAND 'GLOBALV SET HEADERS' Action                03673000
  4825.             Address COMMAND 'GLOBALV SETL SUBJECT',                     03674000
  4826.                              Get_Subject(word(item.ptr,1))              03675000
  4827.             status=TEXT_Response(Action word(item.ptr,1))               03676000
  4828.             If word(status,1)='-1' Then Return(Status)                  03677000
  4829.             Status=Check_Status()                                       03678000
  4830.             Call Split_Article                                          03679000
  4831.             Push group                                                  03680000
  4832.             Address COMMAND 'XEDIT $A$R$T$I XEDIT S',                   03681000
  4833.                             '(PROFILE NNR$ARTI WIDTH 300'               03682000
  4834.             Pull command                                                03683000
  4835.             if index('QUIT POST',command) > 0 then ptr=0                03684000
  4836.             else if command='NEXT' then ptr=ptr+1                       03685000
  4837.             else if command='LAST' then ptr=ptr-1                       03686000
  4838.             else if command='HEADBODY' then                             03687000
  4839.               do                                                        03688000
  4840.                 if Action='ARTICLE' then Action='BODY'                  03689000
  4841.                 else Action='ARTICLE'                                   03690000
  4842.               end                                                       03691000
  4843.           end                                                           03692000
  4844.           if index('POST',command) > 0 then                             03693000
  4845.             do                                                          03694000
  4846.               Address COMMAND 'GLOBALV SET ARTICLE' word(Status,2)      03695000
  4847.               Address COMMAND 'GLOBALV SET POSTING' 1                   03696000
  4848.               status=TEXT_Response('HEAD ' word(Status,2))              03697000
  4849.               If word(status,1)='-1' Then Return(Status)                03698000
  4850.               Status=Check_Status()                                     03699000
  4851.               Call Split_Article                                        03700000
  4852.             end                                                         03701000
  4853.           else                                                          03702000
  4854.             do                                                          03703000
  4855.               Address COMMAND 'GLOBALV SET ARTICLE' SaveArticle         03704000
  4856.             end                                                         03705000
  4857.           Address COMMAND 'GLOBALV SET FARTICLE' FArticle               03706000
  4858.           Address COMMAND 'GLOBALV SET LARTICLE' LArticle               03707000
  4859.           Address COMMAND 'GLOBALV SET HEADERS' Action                  03708000
  4860.           Status=0                                                      03709000
  4861.         End                                                             03710000
  4862.     End                                                                 03711000
  4863. Return(Status)                                                          03712000
  4864. /**********************************************************************/03713000
  4865. /*   Get Articles                                                     */03714000
  4866. /**********************************************************************/03715000
  4867. NEWSArti:Procedure expose socket item.                                  03716000
  4868. parse arg Action group start_article newnews                            03717000
  4869.   status=STATUS_Response('GROUP' group)                                 03718000
  4870.   if word(Status,1)='211' then                                          03719000
  4871.     do                                                                  03720000
  4872.       parse var status . articles first_article last_article .          03721000
  4873.       Address COMMAND 'GLOBALV SET FRST_ACT' first_article              03722000
  4874.       Address COMMAND 'GLOBALV SET LAST_ACT' last_article               03723000
  4875.       If articles > 0 then                                              03724000
  4876.         do                                                              03725000
  4877.           if newnews then                                               03726000
  4878.             do                                                          03727000
  4879.               Status=STATUS_Response('STAT '||start_article)            03728000
  4880.               if word(Status,1)='223' then                              03729000
  4881.                 do                                                      03730000
  4882.                   Status=STATUS_Response('NEXT')                        03731000
  4883.                   if word(Status,1)^='223' then Return(0)               03732000
  4884.                   start_article=word(Status,2)                          03733000
  4885.                 end                                                     03734000
  4886.             end                                                         03735000
  4887.           if start_article=0 then start_article=''                      03736000
  4888.           Status=STATUS_Response('STAT '||start_article)                03737000
  4889.           if word(Status,1)='423' then                                  03738000
  4890.             do                                                          03739000
  4891.               if Start_Article > First_Article Then                     03740000
  4892.                 First_Article=Start_Article                             03741000
  4893.               do i=First_Article to Last_Article                        03742000
  4894.                 Status=STATUS_Response('STAT '||i)                      03743000
  4895.                 start_article=word(Status,2)                            03744000
  4896.                 if word(Status,1)='223' then Leave                      03745000
  4897.               end                                                       03746000
  4898.             end                                                         03747000
  4899.           if word(Status,1)^='223' then Return(0)                       03748000
  4900.           SaveArticle=start_article                                     03749000
  4901.           BackArticle=start_article                                     03750000
  4902.           status=TEXT_Response(Action start_article)                    03751000
  4903.           If word(status,1)='-1' Then Return(Status)                    03752000
  4904.           Status=Check_Status()                                         03753000
  4905.           Call Split_Article                                            03754000
  4906.           Push group                                                    03755000
  4907.           Address COMMAND 'GLOBALV SET HEADERS' Action                  03756000
  4908.           Address COMMAND 'GLOBALV SETL SUBJECT',                       03757000
  4909.                              Get_Subject(word(Status,2))                03758000
  4910.           Address COMMAND 'XEDIT $A$R$T$I XEDIT S',                     03759000
  4911.                             '(PROFILE NNR$ARTI WIDTH 300'               03760000
  4912.           Pull command                                                  03761000
  4913.           do Forever                                                    03762000
  4914.             if command='NEXT' then                                      03763000
  4915.               Status=STATUS_Response('NEXT')                            03764000
  4916.             else if command='LAST' then                                 03765000
  4917.               Status=STATUS_Response('LAST')                            03766000
  4918.             else if command='HEADBODY' then                             03767000
  4919.               do                                                        03768000
  4920.                 if Action='ARTICLE' then Action='BODY'                  03769000
  4921.                 else Action='ARTICLE'                                   03770000
  4922.                 Status='223 '||word(status,2)                           03771000
  4923.               end                                                       03772000
  4924.             if word(Status,1)='223' then                                03773000
  4925.               do                                                        03774000
  4926.                 status=TEXT_Response(Action word(Status,2))             03775000
  4927.                 If word(status,1)='-1' Then Return(Status)              03776000
  4928.                 Status=Check_Status()                                   03777000
  4929.                 if SaveArticle < word(Status,2) then                    03778000
  4930.                   SaveArticle=word(Status,2)                            03779000
  4931.                 else if BackArticle > word(Status,2) then               03780000
  4932.                   BackArticle=word(Status,2)                            03781000
  4933.                 Address COMMAND 'GLOBALV SET HEADERS' Action            03782000
  4934.                 Address COMMAND 'GLOBALV SETL SUBJECT',                 03783000
  4935.                              Get_Subject(word(Status,2))                03784000
  4936.                 Call Split_Article                                      03785000
  4937.                 Push group                                              03786000
  4938.                 Address COMMAND 'XEDIT $A$R$T$I XEDIT S',               03787000
  4939.                             '(PROFILE NNR$ARTI WIDTH 300'               03788000
  4940.                 Pull command                                            03789000
  4941.               end                                                       03790000
  4942.             if word(Status,1)^='220' & word(Status,1)^='222' then       03791000
  4943.               Leave                                                     03792000
  4944.             if index('QUIT POST',command)>0 then                        03793000
  4945.               Leave                                                     03794000
  4946.           end                                                           03795000
  4947.           if index('POST',command) > 0 then                             03796000
  4948.             do                                                          03797000
  4949.               Address COMMAND 'GLOBALV SET ARTICLE' word(Status,2)      03798000
  4950.               Address COMMAND 'GLOBALV SET POSTING' 1                   03799000
  4951.               status=TEXT_Response('HEAD' word(Status,2))               03800000
  4952.               If word(status,1)='-1' Then Return(Status)                03801000
  4953.               Status=Check_Status()                                     03802000
  4954.               Call Split_Article                                        03803000
  4955.             end                                                         03804000
  4956.           else                                                          03805000
  4957.             do                                                          03806000
  4958.               Status=STATUS_Response('NEXT')                            03807000
  4959.               if word(Status,1)='223' then                              03808000
  4960.                 Address COMMAND 'GLOBALV SET NEXT_ACT' word(Status,2)   03809000
  4961.               Address COMMAND 'GLOBALV SET ARTICLE' SaveArticle         03810000
  4962.               Address COMMAND 'GLOBALV SET BACKART' BackArticle         03811000
  4963.             end                                                         03812000
  4964.           Address COMMAND 'GLOBALV SET HEADERS' Action                  03813000
  4965.           Status=0                                                      03814000
  4966.         End                                                             03815000
  4967.       Else                                                              03816000
  4968.         Return(0) /* no articles */                                     03817000
  4969.     End                                                                 03818000
  4970. Return(Status)                                                          03819000
  4971. /**********************************************************************/03820000
  4972. /* A2E EXEC simple ascii to ebcdic translate by JCA                   */03821000
  4973. /**********************************************************************/03822000
  4974. A2E:                                                                    03823000
  4975.    return translate(arg(1), ,                                           03824000
  4976.      '00010203372D2E2F1605150B0C0D0E0F'x||,                             03825000
  4977.      '101112133C3D322618193F27221D351F'x||,                             03826000
  4978.      '405A7F7B5B6C507D4D5D5C4E6B604B61'x||,                             03827000
  4979.      'F0F1F2F3F4F5F6F7F8F97A5E4C7E6E6F'x||,                             03828000
  4980.      '7CC1C2C3C4C5C6C7C8C9D1D2D3D4D5D6'x||,                             03829000
  4981.      'D7D8D9E2E3E4E5E6E7E8E9ADE0BD5F6D'x||,                             03830000
  4982.      '79818283848586878889919293949596'x||,                             03831000
  4983.      '979899A2A3A4A5A6A7A8A9C04FD0A107'x||,                             03832000
  4984.      '00010203372D2E2F1605250B0C0D0E0F'x||,                             03833000
  4985.      '101112133C3D322618193F27221D351F'x||,                             03834000
  4986.      '405A7F7B5B6C507D4D5D5C4E6B604B61'x||,                             03835000
  4987.      'F0F1F2F3F4F5F6F7F8F97A5E4C7E6E6F'x||,                             03836000
  4988.      '7CC1C2C3C4C5C6C7C8C9D1D2D3D4D5D6'x||,                             03837000
  4989.      'D7D8D9E2E3E4E5E6E7E8E9ADE0BD5F6D'x||,                             03838000
  4990.      '79818283848586878889919293949596'x||,                             03839000
  4991.      '979899A2A3A4A5A6A7A8A9C04FD0A107'x)                               03840000
  4992. /**********************************************************************/03841000
  4993. /* E2A EXEC simple ebcdic to ascii translate by JCA                   */03842000
  4994. /**********************************************************************/03843000
  4995. E2A:                                                                    03844000
  4996.    return translate(arg(1), ,                                           03845000
  4997.      '000102031A091A7F1A1A1A0B0C0D0E0F'x||,                             03846000
  4998.      '101112131A0A081A18191A1A1C1D1E1F'x||,                             03847000
  4999.      '1A1A1C1A1A0A171B1A1A1A1A1A050607'x||,                             03848000
  5000.      '1A1A161A1A1E1A041A1A1A1A14151A1A'x||,                             03849000
  5001.      '20A6E180EB909FE2AB8B9B2E3C282B7C'x||,                             03850000
  5002.      '26A9AA9CDBA599E3A89E21242A293B5E'x||,                             03851000
  5003.      '2D2FDFDC9ADDDE989DACBA2C255F3E3F'x||,                             03852000
  5004.      'D78894B0B1B2FCD6FB603A2340273D22'x||,                             03853000
  5005.      'F861626364656667686996A4F3AFAEC5'x||,                             03854000
  5006.      '8C6A6B6C6D6E6F7071729787CE93F1FE'x||,                             03855000
  5007.      'C87E737475767778797AEFC0DA5BF2F9'x||,                             03856000
  5008.      'B5B6FDB7B8B9E6BBBCBD8DD9BF5DD8C4'x||,                             03857000
  5009.      '7B414243444546474849CBCABEE8ECED'x||,                             03858000
  5010.      '7D4A4B4C4D4E4F505152A1ADF5F4A38F'x||,                             03859000
  5011.      '5CE7535455565758595AA0858EE9E4D1'x||,                             03860000
  5012.      '30313233343536373839B3F7F0FAA7FF'x)                               03861000
  5013. :READ  NNR$PREF $XEDIT   D2 NNR130 05/09/92 14:09:10                            
  5014. /**------------------------------------------------------------------**/00001000
  5015. /** Network News Reader                                              **/00002000
  5016. /**                                               User Preferences   **/00003000
  5017. /**------------------------------------------------------------------**/00004000
  5018. /*====================== NNR$PREF HISTORY ============================*/00005000
  5019. /* 12/21/91 Created                                                   */00006000
  5020. /* 12/29/91 added header preferences                                  */00007000
  5021. /* 01/28/92 * *_1.2.2c                                                */00008000
  5022. /*       * add novalue routines (for compile)                         */00009000
  5023. /* 03/31/92 * *_1.2.2d                                                */00010000
  5024. /*       * add multiple personal subscriptions                        */00011000
  5025. /*       * fix from GILMART@lstc2vm.stortek.com  (preferences hook)   */00012000
  5026. /* 05/09/92 * *_1.2.2e                                                */00013000
  5027. /*=========================== HISTORY ================================*/00014000
  5028. /**                                                                     00015000
  5029.     Copyright (C) 1991  Paul J. Campbell                                00016000
  5030.                                                                         00017000
  5031.     This program is free software; you can redistribute it and/or modify00018000
  5032.     it under the terms of the MITRE Corporation General Public License a00019000
  5033.     published by the MITRE Corporation                                  00020000
  5034.                                                                         00021000
  5035.     This program is distributed in the hope that it will be useful,     00022000
  5036.     but WITHOUT ANY WARRANTY; without even the implied warranty of      00023000
  5037.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the       00024000
  5038.     MITRE General Public License for more details.                      00025000
  5039.                                                                         00026000
  5040.     You should have received a copy of the MITRE General Public License 00027000
  5041.     along with this program; if not, write to the MITRE Corporation.    00028000
  5042.                                                                         00029000
  5043. **/                                                                     00030000
  5044. signal on novalue                                                       00031000
  5045. trace('N')                                                              00032000
  5046. Address xedit                                                           00033000
  5047. 'Set ctlchar % escape'                                                  00034000
  5048. 'Set ctlchar @ protect red high'                                        00035000
  5049. 'Set ctlchar' '4a'x 'protect yellow high'                               00036000
  5050. 'Set ctlchar ! protect blue nohigh'                                     00037000
  5051. 'Set ctlchar $ noprotect turq high'                                     00038000
  5052. 'Set ctlchar * noprotect white nohigh'                                  00039000
  5053. 'Set ctlchar & protect pink nohigh'                                     00040000
  5054. 'Set ctlchar ^ protect green nohigh'                                    00041000
  5055. 'Extract /lscreen'                                                      00042000
  5056. 'Set msgline on' lscreen.1-3 2 'overlay'                                00043000
  5057. 'Set CMDline BOTTOM'                                                    00044000
  5058. 'SET CURLINE ON 3'                                                      00045000
  5059. 'SET PREFIX OFF'                                                        00046000
  5060. 'SET SCALE OFF'                                                         00047000
  5061. 'SET LINEND OFF'                                                        00048000
  5062. 'SET PF04 ONLY dummy'                                                   00049000
  5063. 'SET PF16 ONLY dummy'                                                   00050000
  5064. Address COMMAND 'GLOBALV SELECT VMNNTP'                                 00051000
  5065. Address COMMAND 'GLOBALV GET VERSION'                                   00052000
  5066. Address COMMAND 'GLOBALV GET NUMBER'                                    00053000
  5067. Address COMMAND 'GLOBALV GET LINES'                                     00054000
  5068. Address COMMAND 'GLOBALV GET LOGPOSTS'                                  00055000
  5069. Address COMMAND 'GLOBALV GET XHEADER2'                                  00056000
  5070. parse value xheader2 with xheader2 .                                    00057000
  5071. Address COMMAND 'GLOBALV GET CURRHLIQ'                                  00058000
  5072. if LogPosts then logpm='YES'                                            00059000
  5073. else logpm='NO'                                                         00060000
  5074. message = ''                                                            00061000
  5075. flag = 'PREF';                                                          00062000
  5076. row=lscreen.1; col=7                                                    00063000
  5077. Address COMMAND 'DESBUF'                                                00064000
  5078. Do Forever                                                              00065000
  5079.   Call UPrefScreen                                                      00066000
  5080.   'Read Nochange Tag'                                                   00067000
  5081.   'Extract /cursor'                                                     00068000
  5082.   row = cursor.5; col = cursor.6                                        00069000
  5083.   num=0                                                                 00070000
  5084.   Do While(Queued()>0)                                                  00071000
  5085.     num=num+1                                                           00072000
  5086.     Parse Pull QueuedLine.num                                           00073000
  5087.   end                                                                   00074000
  5088.   do i=1 to num                                                         00075000
  5089.     Parse var QueuedLine.i key line column string;                      00076000
  5090.     if key = "RES" Then Call UPREF('Reserved')                          00077000
  5091.     else SaveQueued=QueuedLine.i                                        00078000
  5092.   end                                                                   00079000
  5093.   Parse Var SaveQueued key line column string;                          00080000
  5094.   Select                                                                00081000
  5095.     When key = "CMD" Then Call UPREF('CommandLine')                     00082000
  5096.     When key = "PFK" Then Call UPREF('PFKeys')                          00083000
  5097.     When key = "ETK" Then Call Cursor                                   00084000
  5098.     otherwise Nop                                                       00085000
  5099.   End                                                                   00086000
  5100.   If flag='QUIT' then                                                   00087000
  5101.     leave                                                               00088000
  5102. End                                                                     00089000
  5103. Address COMMAND 'GLOBALV SETL NUMBER' number                            00090000
  5104. Address COMMAND 'GLOBALV SETL LINES' lines                              00091000
  5105. Address COMMAND 'GLOBALV SETL LOGPOSTS' find(logpm,'YES')               00092000
  5106. Address COMMAND 'GLOBALV SETL XHEADER2' xheader2 '99'                   00093000
  5107. Address COMMAND 'GLOBALV SETL CURRHLIQ' currhliq                        00094000
  5108. Address COMMAND 'DESBUF'                                                00095000
  5109. 'QQUIT'                                                                 00096000
  5110. Exit                                                                    00097000
  5111. /*-----------------------------------------------------------------*/   00098000
  5112. /* Routine Handle signal novalue                                   */   00099000
  5113. /*-----------------------------------------------------------------*/   00100000
  5114. NOVALUE:                                                                00101000
  5115. parse source . . myname .                                               00102000
  5116. say "NOVALUE error in" myname "line" sigl":"                            00103000
  5117. say "Source line>" sourceline(sigl)                                     00104000
  5118. 'QQUIT'                                                                 00105000
  5119. exit(999)                                                               00106000
  5120. /*-----------------------------------------------------------------*/   00107000
  5121. /* Routine to handle reserved lines.                               */   00108000
  5122. /*-----------------------------------------------------------------*/   00109000
  5123. UPREF:                                                                  00110000
  5124. parse arg action                                                        00111000
  5125.   if action='Reserved' then                                             00112000
  5126.     do                                                                  00113000
  5127.       string=strip(string)                                              00114000
  5128.       if line = 8 Then                                                  00115000
  5129.         do                                                              00116000
  5130.           Message=string||' is not numeric!'                            00117000
  5131.           if verify(string,'0123456789')^=0 then Return                 00118000
  5132.           Message='Zero is not a vaild value (must be greater than 0)!' 00119000
  5133.           if string=0 then Return                                       00120000
  5134.           number=string                                                 00121000
  5135.           Message=string||' is an acceptable value for the number',     00122000
  5136.           'of Articles/Group!'                                          00123000
  5137.         end                                                             00124000
  5138.       else if line = 10 Then                                            00125000
  5139.         do                                                              00126000
  5140.           Message=string||' is not numeric!'                            00127000
  5141.           if verify(string,'0123456789')^=0 then Return                 00128000
  5142.           Message='Zero is not a vaild value (must be greater than 0)!' 00129000
  5143.           if string=0 then Return                                       00130000
  5144.           lines=string                                                  00131000
  5145.           Message=string||' is an acceptable value for the number',     00132000
  5146.           'of Lines/Article!'                                           00133000
  5147.         end                                                             00134000
  5148.       else if line = 12 Then                                            00135000
  5149.         do                                                              00136000
  5150.           if translate(string)='YES' | translate(string)='NO' then      00137000
  5151.             do                                                          00138000
  5152.               logpm=translate(string)                                   00139000
  5153.               Message=string||' is an acceptable value for LOGing'      00140000
  5154.             end                                                         00141000
  5155.           else                                                          00142000
  5156.             do                                                          00143000
  5157.               Message=string||' is NOT an acceptable value for LOGing'  00144000
  5158.             end                                                         00145000
  5159.         end                                                             00146000
  5160.       else if line = 14 Then                                            00147000
  5161.         do                                                              00148000
  5162.           permit='ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._'               00149000
  5163.           if verify(translate(string),permit)=0 then                    00150000
  5164.             do                                                          00151000
  5165.               if strip(string)='Subscriptions' then                     00152000
  5166.                 Message=string||' NOT acceptable, try another name.'    00153000
  5167.               else                                                      00154000
  5168.                 do                                                      00155000
  5169.                   currhliq=strip(string)                                00156000
  5170.                   Message=string||' is an acceptable value for HLIQ'    00157000
  5171.                 end                                                     00158000
  5172.             end                                                         00159000
  5173.           else                                                          00160000
  5174.             do                                                          00161000
  5175.               Message=string||' NOT acceptable, use "'||permit||'"!'    00162000
  5176.             end                                                         00163000
  5177.         end                                                             00164000
  5178.     end                                                                 00165000
  5179.   Else If action='CommandLine' then                                     00166000
  5180.     do                                                                  00167000
  5181.       line=translate(line)                                              00168000
  5182.       If (Abbrev('QQUIT',line,2) | line = 'QUIT') Then                  00169000
  5183.         Do                                                              00170000
  5184.           Flag = 'QUIT'         /* clear stack                 */       00171000
  5185.         End                                                             00172000
  5186.       Else                                                              00173000
  5187.         message = 'Unsupported command:' line column string             00174000
  5188.     End                                                                 00175000
  5189.   Else If action='PFKeys' then                                          00176000
  5190.     do                                                                  00177000
  5191.       Call PFKmap                                                       00178000
  5192.       If Line=1 then Call NNR$HELP                                      00179000
  5193.       else If Line=3 then flag= 'QUIT'                                  00180000
  5194.       else If Line=12 then Call Rotate                                  00181000
  5195.       else message='Unsupported PFK'                                    00182000
  5196.     End                                                                 00183000
  5197. Return                                                                  00184000
  5198. /*-----------------------------------------------------------------*/   00185000
  5199. /* Routine to display the 2nd post menu screen.                    */   00186000
  5200. /*-----------------------------------------------------------------*/   00187000
  5201. UPrefScreen:                                                            00188000
  5202.    'Set Reserved 1 noh' '%!              %@',                           00189000
  5203.                   center('*** NNR/VM ('||version||') ***',35),          00190000
  5204.                   right('User Preferences',25),                         00191000
  5205.                   '%!                    '                              00192000
  5206.    'Set Reserved 2 noh'                                                 00193000
  5207.    'Set Reserved 3 noh'                                                 00194000
  5208.    'Set Reserved 4 noh'                                                 00195000
  5209.    'Set Reserved 5 noh'                                                 00196000
  5210.    'Set Reserved 6 noh',                                                00197000
  5211.      '%@ Use PF12 to Rotate value for Header Screen display:%*'||,      00198000
  5212.      Left(Xheader2,20)'%!'                                              00199000
  5213.    'Set Reserved 7 noh'                                                 00200000
  5214.    'Set Reserved 8 noh',                                                00201000
  5215.      '%@ Maximum number of Articles/Group(300):%*'||,                   00202000
  5216.      Right(Number,3)'%!'                                                00203000
  5217.    'Set Reserved 9 noh'                                                 00204000
  5218.    'Set Reserved 10 noh',                                               00205000
  5219.      '%@ Maximum number of Lines/Article(1500):%*'||,                   00206000
  5220.      Right(Lines,4)'%!'                                                 00207000
  5221.    'Set Reserved 11 noh'                                                00208000
  5222.    'Set Reserved 12 noh',                                               00209000
  5223.      '%@ Log outgoing POSTings and MAIL(YES/NO):%*'||,                  00210000
  5224.      Right(logpm,3)'%!'                                                 00211000
  5225.    'Set Reserved 13 noh'                                                00212000
  5226.    'Set Reserved 14 noh',                                               00213000
  5227.      '%@ Set Current Personal HLI Qualifier (OFF):%*'||,                00214000
  5228.      Left(currhliq,16)'%!'                                              00215000
  5229.    Do scrpos=15 to lscreen.1-4                                          00216000
  5230.    'Set Reserved' scrpos 'noh'                                          00217000
  5231.    End                                                                  00218000
  5232.    'Set Reserved' lscreen.1-3 'noh'                                     00219000
  5233.    'Set Reserved' lscreen.1-2 'high',                                   00220000
  5234.                                  ' 1= Help     ',                       00221000
  5235.                                ||'2=          ',                        00222000
  5236.                                ||'3= Quit     ',                        00223000
  5237.                                ||' 4=          ',                       00224000
  5238.                                ||' 5=          ',                       00225000
  5239.                                ||' 6=         '                         00226000
  5240.    'Set Reserved' lscreen.1-1 'high',                                   00227000
  5241.                                  ' 7=          ',                       00228000
  5242.                                ||'8=          ',                        00229000
  5243.                                ||'9=          ',                        00230000
  5244.                                ||'10=          ',                       00231000
  5245.                                ||'11=          ',                       00232000
  5246.                                ||'12= Rotate  '                         00233000
  5247.    If message ^= "" Then                                                00234000
  5248.       Do                                                                00235000
  5249.          'EMSG' message                                                 00236000
  5250.          message = ''                                                   00237000
  5251.       End;                                                              00238000
  5252.    'Cursor screen' row col                                              00239000
  5253. Return                                                                  00240000
  5254. /*-----------------------------------------------------------------*/   00241000
  5255. /* Routine to handle PFK Mapping.                                  */   00242000
  5256. /*-----------------------------------------------------------------*/   00243000
  5257. PFKmap:                                                                 00244000
  5258.   if line>12 then line=line-12                                          00245000
  5259. Return                                                                  00246000
  5260. /*-----------------------------------------------------------------*/   00247000
  5261. /* Routine to handle rotation through variable                     */   00248000
  5262. /*-----------------------------------------------------------------*/   00249000
  5263. Rotate:                                                                 00250000
  5264.   xhdr2='Subject Message-ID Keywords Date Newsgroups From'              00251000
  5265.   xhdr2=xhdr2||' Organization Lines Sender'                             00252000
  5266.   'Extract /cursor'                                                     00253000
  5267.   if cursor.5 = 6 then                                                  00254000
  5268.     do                                                                  00255000
  5269.       if index(xhdr2,xheader2)=0 then                                   00256000
  5270.         do                                                              00257000
  5271.           message='Header value "'xheader2'" is not in our list!'       00258000
  5272.           xheader2='Subject'                                            00259000
  5273.           Return                                                        00260000
  5274.         end                                                             00261000
  5275.       /* vm/sp 6 has wordpos but we can not use it (yet) */             00262000
  5276.       do i=1 to words(xhdr2)                                            00263000
  5277.         if xheader2=word(xhdr2,i) then                                  00264000
  5278.           leave                                                         00265000
  5279.       end                                                               00266000
  5280.       if i=words(xhdr2) then                                            00267000
  5281.         xheader2=word(xhdr2,1)                                          00268000
  5282.       else                                                              00269000
  5283.         xheader2=word(xhdr2,i+1)                                        00270000
  5284.     end                                                                 00271000
  5285.   else                                                                  00272000
  5286.    message='Value "Rotation" is not possible here!'                     00273000
  5287. Return                                                                  00274000
  5288. /*-----------------------------------------------------------------*/   00275000
  5289. /* Routine to handle the enter key (cursor movement)               */   00276000
  5290. /*-----------------------------------------------------------------*/   00277000
  5291. Cursor:                                                                 00278000
  5292.   'CURSOR HOME'                                                         00279000
  5293.   'EXTRACT /CURSOR/'                                                    00280000
  5294.   row=cursor.1                                                          00281000
  5295.   col=cursor.2                                                          00282000
  5296. Return                                                                  00283000
  5297. NNR$HELP: Procedure                                                     00284000
  5298. /**---------------------------------------------------------------**/   00285000
  5299. /** Network News Reader                                           **/   00286000
  5300. /**                                                       Help    **/   00287000
  5301. /**---------------------------------------------------------------**/   00288000
  5302. 'Extract /lscreen'                                                      00289000
  5303. 'Set msgline on' lscreen.1-3 '2 overlay'                                00290000
  5304. Address COMMAND 'GLOBALV SELECT VMNNTP'                                 00291000
  5305. Address COMMAND 'GLOBALV GET VERSION'                                   00292000
  5306. 'SET PF04 ONLY dummy'                                                   00293000
  5307. 'SET PF16 ONLY dummy'                                                   00294000
  5308. message = '';                                                           00295000
  5309. start=6*18+1                                                            00296000
  5310. scrheader='** User Preferences Screen'                                  00297000
  5311. helpscr.=''                                                             00298000
  5312. Address COMMAND 'EXECIO 18 DISKR NNRHELP $XSCREEN *',                   00299000
  5313.  start '(FINI STEM HELPSCR.'                                            00300000
  5314. Address COMMAND 'DESBUF'                                                00301000
  5315. Do Forever;                                                             00302000
  5316.   Call HELPscreen                                                       00303000
  5317.   'Read Nochange Tag'                                                   00304000
  5318.   'Extract /cursor'                                                     00305000
  5319.   row = cursor.5; col = cursor.6                                        00306000
  5320.   num=0                                                                 00307000
  5321.   Do While(Queued()>0)                                                  00308000
  5322.     num=num+1                                                           00309000
  5323.     Parse Pull QueuedLine.num                                           00310000
  5324.   end                                                                   00311000
  5325.   do i=1 to num                                                         00312000
  5326.     Parse var QueuedLine.i key line column string;                      00313000
  5327.     if key = "RES" Then Nop                                             00314000
  5328.     else SaveQueued=QueuedLine.i                                        00315000
  5329.   end                                                                   00316000
  5330.   Parse Var SaveQueued key line column string;                          00317000
  5331.   Select                                                                00318000
  5332.     When key = "CMD" Then Nop                                           00319000
  5333.     When key = "PFK" Then                                               00320000
  5334.       do                                                                00321000
  5335.         If Line=1 then Address COMMAND 'HELP CMS NNR'                   00322000
  5336.         else If Line=3 then                                             00323000
  5337.           do                                                            00324000
  5338.             Do i = 3 to 20                                              00325000
  5339.               'Set Reserved' i 'off'                                    00326000
  5340.             End                                                         00327000
  5341.             Return                                                      00328000
  5342.           End                                                           00329000
  5343.         else message='Unsupported PFK'                                  00330000
  5344.       end                                                               00331000
  5345.     When key = "ETK" Then Nop;                                          00332000
  5346.     otherwise Nop                                                       00333000
  5347.   End                                                                   00334000
  5348. End   /* Do Forever */                                                  00335000
  5349. Return                                                                  00336000
  5350.                                                                         00337000
  5351. /*-----------------------------------------------------------------*/   00338000
  5352. /* Routine to display the main menu screen.                        */   00339000
  5353. /*-----------------------------------------------------------------*/   00340000
  5354. HELPscreen:                         /* set each line of the screen */   00341000
  5355.    'Set Reserved 1 noh' '%!              %@',                           00342000
  5356.                   center('*** NNR/VM ('||version||') ***',35),          00343000
  5357.                   right('Help',25),                                     00344000
  5358.                   '%!                    '                              00345000
  5359.    'Set Reserved 2 noh' '%@'||scrheader||'%!'                           00346000
  5360.    Do i = 3 to 20                                                       00347000
  5361.      j=i-2                                                              00348000
  5362.      'Set Reserved' i 'noh' '%!'Left(helpscr.j,78)'%! '                 00349000
  5363.    End;                                                                 00350000
  5364.    Do i = 21 to lscreen.1-4;                                            00351000
  5365.      'Set Reserved' i 'noh'                                             00352000
  5366.    End;                                                                 00353000
  5367.    'Set Reserved' lscreen.1-3 'Noh'                                     00354000
  5368.    'Set Reserved' lscreen.1-2 'high',                                   00355000
  5369.                                  ' 1= NNR_Help ',                       00356000
  5370.                                ||'2=          ',                        00357000
  5371.                                ||'3= Quit     ',                        00358000
  5372.                                ||' 4=          ',                       00359000
  5373.                                ||' 5=          ',                       00360000
  5374.                                ||' 6=         '                         00361000
  5375.    'Set Reserved' lscreen.1-1 'high',                                   00362000
  5376.                                  ' 7=          ',                       00363000
  5377.                                ||'8=          ',                        00364000
  5378.                                ||'9=          ',                        00365000
  5379.                                ||'10=          ',                       00366000
  5380.                                ||'11=          ',                       00367000
  5381.                                ||'12=         '                         00368000
  5382.    If message ^= "" Then                                                00369000
  5383.       Do                                                                00370000
  5384.          'EMSG' message                                                 00371000
  5385.          message = ''                                                   00372000
  5386.       End;                                                              00373000
  5387.    'Cursor screen' 15 4                                                 00374000
  5388. Return                                                                  00375000
  5389. :READ  NNR      HELPCMS  D1 NNR130 05/10/92 14:41:59                            
  5390. .cm NNR HELPCMS                                                                 
  5391. .fo off                                                                         
  5392. .cs 1 on                                                                        
  5393. NNR - INVOKE Network News Reader                                                
  5394.                                                                                 
  5395. .cs 1 off                                                                       
  5396. .cs 2 on                                                                        
  5397. The format of the NNR command is:                                               
  5398.                                                                                 
  5399.     +------+-------------------------------------------------------  +          
  5400.     |      |                                                         |          
  5401.     | NNR  |  << Argument > ( Options >                              |          
  5402.     |      |                                                         |          
  5403.     |      |  Where the argument may be a single news group          |          
  5404.     |      |  in the form "News.Group.Ext" or "p_s" which            |          
  5405.     |      |  delivers you to your Personal_Subscriptions.           |          
  5406.     |      |                                                         |          
  5407.     |      |  Where the options are:                                 |          
  5408.     |      |                                                         |          
  5409.     |      |    +               +   defaults:                        |          
  5410.     |      |    | ARTICLES nnn  |     300                            |          
  5411.     |      |    | HEADERS YES/NO|     yes                            |          
  5412.     |      |    | NEWS   ALL/NEW|     new                            |          
  5413.     |      |    | DAYSBACK nn   |      7                             |          
  5414.     |      |    | LINES nnnn    |    1500                            |          
  5415.     |      |    | LOG/NOLOG     |     log                            |          
  5416.     |      |    | POST          |     N/A                            |          
  5417.     |      |    | IPADDR addr   |    System Default                  |          
  5418.     |      |    +               +                                    |          
  5419.     |      |                                                         |          
  5420.     +------+---------------------------------------------------------+          
  5421.                                                                                 
  5422. .cs 2 off                                                                       
  5423. .cs 3 on                                                                        
  5424.                                                                                 
  5425. NNR PARAMETERS                                                                  
  5426.                                                                                 
  5427.     NNR will take a news group as an argument.                                  
  5428.                                                                                 
  5429. GENERAL NNR OPTIONS                                                             
  5430.                                                                                 
  5431. The following options are available to all users of the NNR command:            
  5432.                                                                                 
  5433.     ARTICLES -                                                                  
  5434.          The default for the number of articles is 300. If you decide           
  5435.          to use a number larger than this you may run out of virtual            
  5436.          memory. The number of articles affects the behavior of the             
  5437.          Header screen only. You have the option to read the article            
  5438.          directly without the use of the Headers screen. This would             
  5439.          start you at the first available article regardless of the             
  5440.          number of articles. To override this default option you could          
  5441.          type the following:                                                    
  5442.                                                                                 
  5443.          "NNR ( ARTICLES 50"                                                    
  5444.                                                                                 
  5445.          This will set the default for the Headers screen to the 50             
  5446.          most recent articles. If you want more than 300 you may need           
  5447.          to "DEFINE STORAGE 4M" and "IPL CMS" again.                            
  5448.                                                                                 
  5449.     HEADERS -                                                                   
  5450.          This option is for those people who would rather not see all           
  5451.          of the fields associated with the header material. The headers         
  5452.          contain information related to the news group and the individual       
  5453.          who posted the news. To override this you would type the               
  5454.          following:                                                             
  5455.                                                                                 
  5456.          "NNR ( HEADERS NO"                                                     
  5457.                                                                                 
  5458.          Additionally, at the Article level, you may toggle between             
  5459.          headers+body or body only using the PFK "HeadBody".                    
  5460.                                                                                 
  5461.     NEWS -                                                                      
  5462.           The "NEWS" option is useful only when you specify a news              
  5463.           group as an argument. "NEWS" with "ALL" will yield all articles       
  5464.           for the specified group, "NEWS" with "NEW" will show only those       
  5465.           articles new to you, based on the "Groups Read" file. You would       
  5466.           type the following to get "ALL" the news ("NEW" is the default)       
  5467.                                                                                 
  5468.          "NNR news.announce.newusers ( NEWS ALL"                                
  5469.                                                                                 
  5470.           Please note that the news group in the above example is in            
  5471.           lower case. All groups are case sensitive.                            
  5472.                                                                                 
  5473.     DAYSBACK -                                                                  
  5474.           From time to time new groups get added to the server. The             
  5475.           "daysback" option allows you to override the default window           
  5476.           for the number of days back you examine new groups. The default       
  5477.           number of days back is seven; you may go back as many as 30.          
  5478.                                                                                 
  5479.           There is a pseudo group associated with this phenomenon called        
  5480.           "New_Groups_Since_mm/dd/yy" where mm/dd/yy will be the date           
  5481.           from which we inventory the new groups. You would type the            
  5482.           following to check the new groups 30 days back:                       
  5483.                                                                                 
  5484.           "NNR ( DAYSBACK 30"                                                   
  5485.                                                                                 
  5486.     LINES -                                                                     
  5487.           The default for the number of lines per article is 1500. If you       
  5488.           decide to use a number larger than this you may run out of virtual    
  5489.           memory. Generally, you will find that the greater the number of lines 
  5490.           specified, the more storage is required to display the article read   
  5491.           (refer back to ARTICLES to see how to change storage).                
  5492.                                                                                 
  5493.           "NNR ( LINES 1500"                                                    
  5494.                                                                                 
  5495.     LOG/NOLOG -                                                                 
  5496.           When posting an article, NNR stores a copy of your post in the        
  5497.           NNRPMLOG NOTEBOOK. If you do not wish to keep a copy, specify         
  5498.           the NOLOG option. This option may also be manipulated through the     
  5499.           "U_Prefer" PFK on the SHLI/Groups screen.                             
  5500.                                                                                 
  5501.           "NNR ( NOLOG"                                                         
  5502.                                                                                 
  5503.     POST -                                                                      
  5504.          This option will put you directly in the POST screen. You must         
  5505.          have a valid group as an argument.                                     
  5506.                                                                                 
  5507.            "NNR misc.test ( POST"                                               
  5508.                                                                                 
  5509.          Please note that the news group in the above example is in lower       
  5510.          case. All groups are case sensitive.                                   
  5511.                                                                                 
  5512.     IPADDR -                                                                    
  5513.          NNR is generally configured to a preferred news server but             
  5514.          occasionally it will be desirable to connect to other news             
  5515.          servers. The IPADDR option will allow you to override the              
  5516.          default IP address for the preferred server.                           
  5517.                                                                                 
  5518.             "NNR ( IPADDR 000.000.000.000"                                      
  5519.                                                                                 
  5520. GENERAL FLOW -                                                                  
  5521.                                                                                 
  5522.                                                                                 
  5523.                           ----------                         -----------        
  5524.                           |  NNR   |                         | NNR p_s |        
  5525.                           ----------                         -----------        
  5526.  ------------------------      |      -----------------           |             
  5527.  | NNR group.ext ( POST |      |      | NNR group.ext |           |             
  5528.  ------------------------      |      -----------------           |             
  5529.            |              -----------         |                   |             
  5530.            |              |  PHLI   |         |                   |             
  5531.            |              -----------         |                   |             
  5532.            |                   |              |                   |             
  5533.            |          -------------------     |                   |             
  5534.            |          |All_News/New_News|     |                   |             
  5535.            |          -------------------     |                   |             
  5536.            |                   |              |                   |             
  5537.        --------           -----------         |                   |             
  5538.        | POST |           |  SHLI   |---------|-------------------|             
  5539.        --------           -----------         |                                 
  5540.                             |  |  |           |                                 
  5541.               ---------------  |  ------------|---------------                  
  5542.               |                |              |              |                  
  5543.               |                |              |              |                  
  5544.               |                |              |              |                  
  5545.        ------------       ----------     -----------    ------------            
  5546.        | ARTICLES |       |  POST  |     | HEADERS |    | U_PREFER |            
  5547.        ------------       ----------     -----------    ------------            
  5548.              |                              | | |                               
  5549.  ----------  |  ----------                  | | |                               
  5550.  |  POST  |-----|  MAIL  |                  | | |                               
  5551.  ----------     ----------                  | | |                               
  5552.                        ---------------------- | ------------------              
  5553.                        |                      |                  |              
  5554.                   ------------     ---------------------    ----------          
  5555.                   | ARTICLES |     | SELECTED_ARTICLES |    |  POST  |          
  5556.                   ------------     ---------------------    ----------          
  5557.                        |                      |                                 
  5558.                        ------------------------                                 
  5559.                                    |                                            
  5560.                        ----------  |  ----------                                
  5561.                        |  POST  |-----|  MAIL  |                                
  5562.                        ----------     ----------                                
  5563.                                                                                 
  5564. VARIOUS SCREEN PFK DEFINITIONS                                                  
  5565.                                                                                 
  5566.  ** PHLI/Main Screen                                                            
  5567.                                                                                 
  5568.        Primary High Level Index and PFK definitions. CMS SUBSET is honored.     
  5569.        ENTER toggles cursor position.                                           
  5570.      Personal_Subscriptions - All those groups you are currently subscribed     
  5571.                               to. Treated the same as other HLIs.               
  5572.      New_Groups_Since_mm/dd/yy - All new groups since you last read the news    
  5573.                                  or  7-30 DAYSBACK.                             
  5574.      news         - Description of news programs, etiquette and announcements.  
  5575.      mitre        - Contains all mitre related groups.                          
  5576.      PFK Help     - This display.                                               
  5577.      PFK All_News - Access all the news that is available. Articles read are    
  5578.                     not remembered. Move cursor to desired topic and press      
  5579.                     All_News PFK.                                               
  5580.      PFK Quit     - Exit NNR program.                                           
  5581.      PFK New_News - Access news that is new to you according to "Groups Read"   
  5582.                     file on your account. Articles read are remembered.         
  5583.      PFK Backward - Scrolls backward one screen.                                
  5584.      PFK Forward  - Scrolls forward one screen.                                 
  5585.                                                                                 
  5586.                                                                                 
  5587.  ** SHLI/Groups Screen                                                          
  5588.                                                                                 
  5589.        Move the cursor to a group and press Headers, Articles or Post PFK.      
  5590.        CMS SUBSET is honored. ENTER toggles cursor position.                    
  5591.                                                                                 
  5592.                                                                                 
  5593.      PFK Help     - This display.                                               
  5594.      PFK Articles - Access articles sequentially by article number. Starts with 
  5595.                     the first available article. Cursor position respected.     
  5596.      PFK Quit     - Exits this screen.                                          
  5597.      PFK Headers  - Preferred path to articles. Collects subject and other      
  5598.                     information for display. Cursor position respected.         
  5599.      PFK Post     - Initiates posting procedure. Only group passed to the       
  5600.                     posting screen. Cursor position respected.                  
  5601.      PFK Mark     - Mark the group as been read, zeros the article count.       
  5602.      PFK Backward - Scrolls backward one screen.                                
  5603.      PFK Forward  - Scrolls forward one screen.                                 
  5604.      PFK Sub/UnS  - Subscribe or UnSubscribe to a news group. Will add          
  5605.                     a group to the preferred pseudo HLI (see PREFs screen).     
  5606.      PFK UpdtGrp  - Updates the Group.                                          
  5607.      PFK U_Prefer - Tailor user environment.                                    
  5608.      PFK Power    - Toggle between current Power setting. Initially OFF.        
  5609.  ** Headers Screen                                                              
  5610.                                                                                 
  5611.        This screen collects pertinent info. from each article to display the    
  5612.        originator and something about the content, based on the selection       
  5613.        criteria (subject). CMS SUBSET honored; ENTER toggles cursor position.   
  5614.      PFK Help     - This display.                                               
  5615.      PFK Article  - Read a specific article. Cursor position respected.         
  5616.      PFK Quit     - Exit Headers screen.                                        
  5617.      PFK Selected - Mark each article at the "." with an "x". Mark as many as   
  5618.                     desired, then press the Selected PFK.                       
  5619.      PFK Post     - Initiates posting procedure. The group and subject are      
  5620.                     passed to the posting screen. Cursor position respected.    
  5621.      PFK Mrk2Here - Marks all articles as read, up to the cursor position or    
  5622.                     when cursor is on Command line, ALL articles are marked.    
  5623.      PFK Backward - Scrolls backward one screen.                                
  5624.      PFK Forward  - Scrolls forward one screen.                                 
  5625.      PFK Thread   - Collects articles based on subject.                         
  5626.      PFK Reduce   - Eliminates read articles, "reduces" the number displayed.   
  5627.      PFK Mrk/UMrk - Mark Article/UnMark Article toggle.                         
  5628.      PFK NxtGroup - Moves to the next group in the SHLI list.                   
  5629.                                                                                 
  5630.  ** U_Prefer Screen                                                             
  5631.        You may change any of the values listed but do so carefully since it     
  5632.        is possible to run out of virtual storage!                               
  5633.                                                                                 
  5634.      Articles/Group - used to determine the upper limit for the number of       
  5635.        articles collected on "Headers Screen". Default is 300 articles.         
  5636.      Lines/Article - used to determine the upper limit for the number of lines  
  5637.        collected for an article on "Article Screen". Default is 1500 lines.     
  5638.      Log/NoLog - you may switch between logging all outgoing mail/post and      
  5639.        not logging them. The default is "YES", log them.                        
  5640.      Add Pseudo PHLI - used in conjunction with the Sub/UnS PFK on the SHLI     
  5641.        screen. The default is OFF, change this to any name and use the          
  5642.        Sub/UnS PFK to add groups to the newly defined PHLI.                     
  5643.                                                                                 
  5644.                                                                                 
  5645.                                                                                 
  5646.      PFK Help     - This display.                                               
  5647.      PFK Quit     - Exit Preferences screen.                                    
  5648.      PFK Rotate   - Range through possible configuration values.                
  5649.  ** POST(1) Screen                                                              
  5650.                                                                                 
  5651.        You must come from the Article screen to get to Post Screen(1). This     
  5652.        screen allows you to determine how to redirect an article.               
  5653.                                                                                 
  5654.                                                                                 
  5655.      PFK Help     - This Display.                                               
  5656.      PFK Quit     - Exit Post(1) screen.                                        
  5657.      PFK Resume   - Allows you to continue an existing POSTing. This is         
  5658.                     independent of the current article.                         
  5659.      PFK Followup - Newly edited information to be sent back to the server      
  5660.                     for POSTing.                                                
  5661.      PFK Mail     - Newly edited information to be directed to the local        
  5662.                     electronic mail system (must fill in recipient).            
  5663.      PFK Reply    - Newly edited information to be directed to the creator      
  5664.                     of an article (directed back to the "From:").               
  5665.      PFK ERASE    - Eliminate the previously edited POSTing to operate on       
  5666.                     the current article                                         
  5667.                                                                                 
  5668.  ** POST(2) Screen                                                              
  5669.                                                                                 
  5670.        The Post Screen(2) allows you to modify any of the highlighted fields.   
  5671.        It is highly recommended that no field be left blank; in some cases the  
  5672.        MAIL or POST will fail. When sending MAIL use the following formats for  
  5673.        the "To:" header (nicknames are supported):                              
  5674.                                                                                 
  5675.            userid   *or*   userid@nodeid   *or*   userid@nodeid.domain.ext      
  5676.                     (* incorporate personal names as follows *)                 
  5677.         Firstname Lastname <userid@nodeid.domain.ext>                           
  5678.                             userid@nodeid.domain.ext  (Firstname Lastname)      
  5679.                                                                                 
  5680.      PFK Help     - This Display.                                               
  5681.      PFK Quit     - Exit Post(2) screen.                                        
  5682.      PFK Edit     - Establishes a limited XEDIT session. When you come          
  5683.                     from the Article screen you will see the entire article     
  5684.                     is supplied.                                                
  5685.      PFK Send     - Will POST/MAIL the results of the edit session. You will    
  5686.                     receive confirmation that your contribution was             
  5687.                     successful.                                                 
  5688.                                                                                 
  5689.  ** Article Screen                                                              
  5690.                                                                                 
  5691.        Most commands honored from the command line. I try to screen out         
  5692.        commands known to be disruptive to your NNR session.                     
  5693.                                                                                 
  5694.                                                                                 
  5695.      PFK Help     - This display.                                               
  5696.      PFK Next     - Read the next article in the sequence.                      
  5697.      PFK Quit     - Exit Article screen.                                        
  5698.      PFK Previous - Read the previous article in the sequence.                  
  5699.      PFK PostMail - Initiates posting procedure. The group and subject are      
  5700.                     passed to the posting screen along with the article.        
  5701.      PFK HeadBody - Toggles between headers+body and body only.                 
  5702.      PFK Backward - Scrolls backward one screen.                                
  5703.      PFK Forward  - Scrolls forward one screen.                                 
  5704.      PFK Print    - Sends the article to the virtual printer.                   
  5705.      PFK Rot13    - Translates screen using a character rotation method.        
  5706.      PFK Log      - Logs article in NNRLOG NOTEBOOK.                            
  5707.      PFK NxtGroup - Moves to the next group in the SHLI list.                   
  5708.                                                                                 
  5709. USAGE NOTES                                                                     
  5710.                                                                                 
  5711.   1.  For a complete discussion of the NNR command, consult the NNR User's      
  5712.       Guide.                                                                    
  5713.                                                                                 
  5714.   2.  There is also a Guide for USENET by the name USENET User Guide for        
  5715.       Mitre. This is a compilation of articles taken from the news group        
  5716.       "news.announce.newusers".                                                 
  5717.                                                                                 
  5718. EXAMPLES                                                                        
  5719.                                                                                 
  5720. Sample NNR command invocations are shown below.                                 
  5721.                                                                                 
  5722.          "NNR"                                                                  
  5723.          "NNR news.announce.newusers"                                           
  5724.          "NNR news.announce.newusers ( NEWS ALL"                                
  5725.          "NNR ( ARTICLES 50"                                                    
  5726.          "NNR ( HEADERS NO"                                                     
  5727.          "NNR ( DAYSBACK 30"                                                    
  5728.          "NNR ( ARTICLES 300 HEADERS YES"                                       
  5729.          "NNR ( ARTICLES 300 LINES 1500"                                        
  5730.          "NNR ( LINES 1500 NOLOG"                                               
  5731.          "NNR news.announce.newusers ( HEADERS NO"                              
  5732.                                                                                 
  5733. .cs 3 off                                                                       
  5734. .CM File generated by m21816 at mbvm                                            
  5735. :READ  NNRHELP  $XSCREEN D2 NNR130 05/10/92 14:41:59                            
  5736.   Primary High Level Index and PFK definitions. CMS SUBSET is honored.          
  5737.   ENTER toggles cursor position.                                                
  5738. Personal_Subscriptions - All those groups you are currently subscribed          
  5739.                          to. Treated the same as other HLIs.                    
  5740. New_Groups_Since_mm/dd/yy - All new groups since you last read the news         
  5741.                             or  7-30 DAYSBACK.                                  
  5742. news         - Description of news programs, etiquette and announcements.       
  5743. mitre        - Contains all mitre related groups.                               
  5744. PFK Help     - This display.                                                    
  5745. PFK All_News - Access all the news that is available. Articles read are         
  5746.                not remembered. Move cursor to desired topic and press           
  5747.                All_News PFK.                                                    
  5748. PFK Quit     - Exit NNR program.                                                
  5749. PFK New_News - Access news that is new to you according to "Groups Read"        
  5750.                file on your account. Articles read are remembered.              
  5751. PFK Backward - Scrolls backward one screen.                                     
  5752. PFK Forward  - Scrolls forward one screen.                                      
  5753.                                                                                 
  5754.   Move the cursor to a group and press Headers, Articles or Post PFK.           
  5755.   CMS SUBSET is honored. ENTER toggles cursor position.                         
  5756.                                                                                 
  5757. PFK Help     - This display.                                                    
  5758. PFK Articles - Access articles sequentially by article number. Starts with      
  5759.                the first available article. Cursor position respected.          
  5760. PFK Quit     - Exits this screen.                                               
  5761. PFK Headers  - Preferred path to articles. Collects subject and other           
  5762.                information for display. Cursor position respected.              
  5763. PFK Post     - Initiates posting procedure. Only group passed to the            
  5764.                posting screen. Cursor position respected.                       
  5765. PFK Mark     - Mark the group as been read, zeros the article count.            
  5766. PFK Backward - Scrolls backward one screen.                                     
  5767. PFK Forward  - Scrolls forward one screen.                                      
  5768. PFK Sub/UnS  - Subscribe or UnSubscribe to a news group.                        
  5769. PFK UpdtGrp  - Updates the Group.                                               
  5770. PFK U_Prefer - Tailor user environment.                                         
  5771. PFK Power    - Toggle between current Power setting. Initially OFF.             
  5772.   This screen collects pertinent info. from each article to display the         
  5773.   originator and something about the content, based on the selection            
  5774.   criteria (subject). CMS SUBSET honored; ENTER toggles cursor position.        
  5775. PFK Help     - This display.                                                    
  5776. PFK Article  - Read a specific article. Cursor position respected.              
  5777. PFK Quit     - Exit Headers screen.                                             
  5778. PFK Selected - Mark each article at the "." with an "x". Mark as many as        
  5779.                desired, then press the Selected PFK.                            
  5780. PFK Post     - Initiates posting procedure. The group and subject are           
  5781.                passed to the posting screen. Cursor position respected.         
  5782. PFK Mrk2Here - Marks all articles as read, up to the cursor position or         
  5783.                when cursor is on Command line, ALL articles are marked.         
  5784. PFK Backward - Scrolls backward one screen.                                     
  5785. PFK Forward  - Scrolls forward one screen.                                      
  5786. PFK Thread   - Collects articles based on subject.                              
  5787. PFK Reduce   - Eliminates read articles, "reduces" the number displayed.        
  5788. PFK Mrk/UMrk - Mark Article/UnMark Article toggle.                              
  5789. PFK NxtGroup - Moves to the next group in the SHLI list.                        
  5790. The post screen (2) allows you to modify any of the highlighted fields.         
  5791. It is highly recommended that no field be left blank; in some cases the         
  5792. MAIL or POST will fail. When sending MAIL use the following formats for         
  5793. the "To:" header (nicknames are supported):                                     
  5794.                                                                                 
  5795.     userid   *or*   userid@nodeid   *or*   userid@nodeid.domain.ext             
  5796.              (* incorporate personal names as follows *)                        
  5797.  Firstname Lastname <userid@nodeid.domain.ext>                                  
  5798.                      userid@nodeid.domain.ext  (Firstname Lastname)             
  5799.                                                                                 
  5800. PFK Help     - This Display.                                                    
  5801. PFK Quit     - Exit Post(2) screen.                                             
  5802. PFK Edit     - Establishes a limited XEDIT session. When you come               
  5803.                from the Article screen you will see the entire article          
  5804.                is supplied.                                                     
  5805. PFK Send     - Will POST/MAIL the results of the edit session. You will         
  5806.                receive confirmation that your contribution was                  
  5807.                successful.                                                      
  5808.   You must come from the Article screen to get to POST screen (1). This         
  5809.   screen allows you to determine how to redirect an article.                    
  5810.                                                                                 
  5811.                                                                                 
  5812. PFK Help     - This Display.                                                    
  5813. PFK Quit     - Exit Post(1) screen.                                             
  5814. PFK Resume   - Allows you to continue an existing POSTing. This is              
  5815.                independent of the current article.                              
  5816. PFK Followup - Newly edited information to be sent back to the server           
  5817.                for POSTing.                                                     
  5818. PFK Mail     - Newly edited information to be directed to the local             
  5819.                electronic mail system (must fill in recipient).                 
  5820. PFK Reply    - Newly edited information to be directed to the creator           
  5821.                of an article (directed back to the "From:").                    
  5822. PFK ERASE    - Eliminate the previously edited POSTing to operate on            
  5823.                the current article.                                             
  5824.                                                                                 
  5825.                                                                                 
  5826.   Most commands honored from the command line. I try to screen out              
  5827.   commands known to be disruptive to your NNR session.                          
  5828.                                                                                 
  5829. PFK Help     - This display.                                                    
  5830. PFK Next     - Read the next article in the sequence.                           
  5831. PFK Quit     - Exit Article screen.                                             
  5832. PFK Previous - Read the previous article in the sequence.                       
  5833. PFK PostMail - Initiates posting procedure. The group and subject are           
  5834.                passed to the posting screen along with the article.             
  5835. PFK HeadBody - Toggles between headers+body and body only.                      
  5836. PFK Backward - Scrolls backward one screen.                                     
  5837. PFK Forward  - Scrolls forward one screen.                                      
  5838. PFK Print    - Sends the article to the virtual printer.                        
  5839. PFK Rot13    - Translates screen using a character rotation method.             
  5840. PFK Log      - Logs article in NNRLOG NOTEBOOK.                                 
  5841. PFK NxtGroup - Moves to the next group in the SHLI list.                        
  5842.                                                                                 
  5843.                                                                                 
  5844.   You may change any of the values listed but do so carefully since it          
  5845.   is possible to run out of virtual storage!                                    
  5846.                                                                                 
  5847. Articles/Group - used to determine the upper limit for the number of            
  5848.   articles collected on "Headers Screen". Default is 300 articles.              
  5849. Lines/Article - used to determine the upper limit for the number of lines       
  5850.   collected for an article on "Article Screen". Default is 1500 lines.          
  5851. Log/NoLog - you may switch between logging all outgoing mail/post and           
  5852.   not logging them. The default is "YES", log them.                             
  5853. Add Pseudo PHLI - used in conjunction with the Sub/UnS PFK on the SHLI          
  5854.   screen. The default is OFF, change this to any name and use the               
  5855.   Sub/UnS PFK to add groups to the newly defined PHLI.                          
  5856.                                                                                 
  5857. PFK Help     - This display.                                                    
  5858. PFK Quit     - Exit Preferences screen.                                         
  5859. PFK Rotate   - Range through possible configuration values.                     
  5860.                                                                                 
  5861.                                                                                 
  5862. :READ  MITRE    LICENSE  D1 NNR130 03/07/91 05:04:18                            
  5863.           MITRE Corporation General Public License                              
  5864.                    Version 1, October 1990                                      
  5865.                                                                                 
  5866.           Copyright (C) 1990 The MITRE Corporation                              
  5867.                      Burlington Road,                                           
  5868.                      Bedford, MA. 01730                                         
  5869.                                                                                 
  5870.  Everyone is permitted to copy and distribute verbatim copies                   
  5871.  of this license document, but changing it is not allowed.                      
  5872.                                                                                 
  5873.                            Preamble                                             
  5874.                                                                                 
  5875.                                                                                 
  5876.   This General Public License is intended to guarantee  freedom to              
  5877. share and change software--to make sure the software is free for                
  5878. all its users.  The General Public License applies to the MITRE                 
  5879. Corporation's software.                                                         
  5880.                                                                                 
  5881.   When we speak of free software, we are referring to freedom, not              
  5882. price.  Specifically, the General Public License is designed to make            
  5883. sure that you have the freedom to give away copies of free                      
  5884. software, that you receive source code or can get it if you want it,            
  5885. that you can change the software or use pieces of it in new free                
  5886. programs; and that you know you can do these things.                            
  5887.                                                                                 
  5888.   To protect your rights, we need to make restrictions that forbid              
  5889. anyone to deny you these rights or to ask you to surrender the rights.          
  5890. These restrictions translate to certain responsibilities for you if you         
  5891. distribute copies of the software, or if you modify it.                         
  5892.                                                                                 
  5893.   For example, if you distribute copies of a such a program, whether            
  5894. gratis or for a distribution fee, you must give the recipients all the rights   
  5895. that you have.  You must make sure that they, too, receive or can get the       
  5896. source code.  And you must tell them their rights.                              
  5897.                                                                                 
  5898.   We protect your rights with two steps: (1) copyright the software, and        
  5899. (2) offer you this license which gives you legal permission to copy,            
  5900. distribute and/or modify the software.                                          
  5901.                                                                                 
  5902.   Also, for each author's protection and ours, we want to make certain          
  5903. that everyone understands that there is no warranty for this free               
  5904. software.  If the software is modified by someone else and passed on, we        
  5905. want its recipients to know that what they have is not the original, so         
  5906. that any problems introduced by others will not reflect on the original         
  5907. authors' reputations.                                                           
  5908.                                                                                 
  5909.   The precise terms and conditions for copying, distribution and                
  5910. modification follow.                                                            
  5911.                                                                                
  5912.              MITRE Corporation GENERAL PUBLIC LICENSE                           
  5913.    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION              
  5914.                                                                                 
  5915.   0. This License Agreement applies to any program or other work which          
  5916. contains a notice placed by the copyright holder saying it may be               
  5917. distributed under the terms of this General Public License.  The                
  5918. "Program", below, refers to any such program or work, and a "work based         
  5919. on the Program" means either the Program or any work containing the             
  5920. Program or a portion of it, either verbatim or with modifications.  Each        
  5921. licensee is addressed as "you".                                                 
  5922.                                                                                 
  5923.   1. You may copy and distribute verbatim copies of the Program's source        
  5924. code as you receive it, in any medium, provided that you conspicuously and      
  5925. appropriately publish on each copy an appropriate copyright notice and          
  5926. disclaimer of warranty; keep intact all the notices that refer to this          
  5927. General Public License and to the absence of any warranty; and give any         
  5928. other recipients of the Program a copy of this General Public License           
  5929. along with the Program.  You may charge a fee for the physical act of           
  5930. transferring a copy.                                                            
  5931.                                                                                 
  5932.   2. You may modify your copy or copies of the Program or any portion of        
  5933. it, and copy and distribute such modifications under the terms of Paragraph     
  5934. 1 above, provided that you also do the following:                               
  5935.                                                                                 
  5936.     a) cause the modified files to carry prominent notices stating that         
  5937.     you changed the files and the date of any change; and                       
  5938.                                                                                 
  5939.     b) cause the whole of any work that you distribute or publish, that         
  5940.     in whole or in part contains the Program or any part thereof, either        
  5941.     with or without modifications, to be licensed at no charge to all           
  5942.     third parties under the terms of this General Public License (except        
  5943.     that you may choose to grant warranty protection to some or all             
  5944.     third parties, at your option).                                             
  5945.                                                                                 
  5946.     c) If the modified program normally reads commands interactively when       
  5947.     run, you must cause it, when started running for such interactive use       
  5948.     in the simplest and most usual way, to print or display an                  
  5949.     announcement including an appropriate copyright notice and a notice         
  5950.     that there is no warranty (or else, saying that you provide a               
  5951.     warranty) and that users may redistribute the program under these           
  5952.     conditions, and telling the user how to view a copy of this General         
  5953.     Public License.                                                             
  5954.                                                                                 
  5955.     d) You may charge a fee for the physical act of transferring a              
  5956.     copy, and you may at your option offer warranty protection in               
  5957.     exchange for a fee.                                                         
  5958.                                                                                 
  5959. Mere aggregation of another independent work with the Program (or its           
  5960. derivative) on a volume of a storage or distribution medium does not bring      
  5961. the other work under the scope of these terms.                                  
  5962.                                                                                 
  5963.   3. You may copy and distribute the Program (or a portion or derivative of     
  5964. it, under Paragraph 2) in object code or executable form under the terms of     
  5965. Paragraphs 1 and 2 above provided that you also do one of the following:        
  5966.                                                                                 
  5967.     a) accompany it with the complete corresponding machine-readable            
  5968.     source code, which must be distributed under the terms of                   
  5969.     Paragraphs 1 and 2 above; or,                                               
  5970.                                                                                 
  5971.     b) accompany it with a written offer, valid for at least three              
  5972.     years, to give any third party free (except for a nominal charge            
  5973.     for the cost of distribution) a complete machine-readable copy of the       
  5974.     corresponding source code, to be distributed under the terms of             
  5975.     Paragraphs 1 and 2 above; or,                                               
  5976.                                                                                 
  5977.     c) accompany it with the information you received as to where the           
  5978.     corresponding source code may be obtained.  (This alternative is            
  5979.     allowed only for noncommercial distribution and only if you                 
  5980.     received the program in object code or executable form alone.)              
  5981.                                                                                 
  5982. Source code for a work means the preferred form of the work for making          
  5983. modifications to it.  For an executable file, complete source code means        
  5984. all the source code for all modules it contains; but, as a special              
  5985. exception, it need not include source code for modules which are standard       
  5986. libraries that accompany the operating system on which the executable           
  5987. file runs, or for standard header files or definitions files that               
  5988. accompany that operating system.                                                
  5989.                                                                                 
  5990.   4. You may not copy, modify, sublicense, distribute or transfer the           
  5991. Program except as expressly provided under this General Public License.         
  5992. Any attempt otherwise to copy, modify, sublicense, distribute or transfer       
  5993. the Program is void, and will automatically terminate your rights to use        
  5994. the Program under this License.  However, parties who have received             
  5995. copies, or rights to use copies, from you under this General Public             
  5996. License will not have their licenses terminated so long as such parties         
  5997. remain in full compliance.                                                      
  5998.                                                                                 
  5999.   5. By copying, distributing or modifying the Program (or any work based       
  6000. on the Program) you indicate your acceptance of this license to do so,          
  6001. and all its terms and conditions.                                               
  6002.                                                                                 
  6003.   6. Each time you redistribute the Program (or any work based on the           
  6004. Program), the recipient automatically receives a license from the original      
  6005. licensor to copy, distribute or modify the Program subject to these             
  6006. terms and conditions.  You may not impose any further restrictions on the       
  6007. recipients' exercise of the rights granted herein.                              
  6008.                                                                                 
  6009.   7. The MITRE Corporation may publish revised and/or new versions              
  6010. of the General Public License from time to time.  Such new versions will        
  6011. be similar in spirit to the present version, but may differ in detail to        
  6012. address new problems or concerns.                                               
  6013.                                                                                 
  6014. Each version is given a distinguishing version number.  If the Program          
  6015. specifies a version number of the license which applies to it and "any          
  6016. later version", you have the option of following the terms and                  
  6017. conditions either of that version or of any later version published by          
  6018. the MITRE Corporation.  If the Program does not specify a version               
  6019. number of the license, you may choose any version ever published by             
  6020. the MITRE Corporation.                                                          
  6021.                                                                                 
  6022.   8. If you wish to incorporate parts of the Program into other free            
  6023. programs whose distribution conditions are different, write to the author       
  6024. to ask for permission.  For software which is copyrighted by the MITRE          
  6025. Corporation, write to the MITRE Corporation; we sometimes                       
  6026. make exceptions for this.  Our decision will be guided by the two goals         
  6027. of preserving the free status of all derivatives of our  software.              
  6028.                                                                                 
  6029.                   NO WARRANTY                                                   
  6030.                                                                                 
  6031.   9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY       
  6032. FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN        
  6033. OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES          
  6034. PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED      
  6035. OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF            
  6036. MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS       
  6037. TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE          
  6038. PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,        
  6039. REPAIR OR CORRECTION.                                                           
  6040.                                                                                 
  6041.   10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING     
  6042. WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR             
  6043. REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,      
  6044. INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING     
  6045. OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED       
  6046. TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY        
  6047. YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER      
  6048. PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE           
  6049. POSSIBILITY OF SUCH DAMAGES.                                                    
  6050.                                                                                 
  6051.               END OF TERMS AND CONDITIONS                                       
  6052. :READ  CENSOR   EXEC     D2 NNR130 02/07/91 22:41:27                            
  6053. /* link to nnr in write mode, issue CENSOR mode */                              
  6054. address command                                                                 
  6055. arg mode                                                                        
  6056. if mode = '' then exit(-1)                                                      
  6057. 'XEDIT  Censor Work   ' mode                                                    
  6058. 'ERASE  Censor OGroups' mode                                                    
  6059. 'RENAME Censor Groups ' mode 'Censor OGroups' mode                              
  6060. 'COPY   Censor Work   ' mode 'Censor Groups ' mode                              
  6061. exit(rc)                                                                        
  6062. :READ  NNR      SCRIPT   Z1 REXNNR 05/10/92 14:49:15                            
  6063. .im POSTS FONT MONO CourB 9 CourBO 9 CourB 9 CourBO 9                           
  6064. .im POSTS FONT TEXT Cent 11 CentI 11 CentB 11 CentBI 11                         
  6065. .im POSTS FONT HELP Cour 10 CourO 10 CourB 10 CourBO 11                         
  6066. .im POSTS FONT HEAD Cent 12 CentI 12 CentB 12 CentBI 12                         
  6067. .im gmlss                                                                       
  6068. :SET item=page value=66                                                         
  6069. :SET item=hor value='8.5i'                                                      
  6070. :SET item=left value='0.6i'                                                     
  6071. :SET item=line value='6.0i'                                                     
  6072. :GDOC                                                                           
  6073. :frontm                                                                         
  6074. :titlep                                                                         
  6075. :title.NNR User's Guide (Version 1.3.0)                                         
  6076. :address                                                                        
  6077. :aline.Paul Campbell                                                            
  6078. :aline.The MITRE Corporation                                                    
  6079. :aline.Burlington Road                                                          
  6080. :aline.Bedford, MA 01730                                                        
  6081. :aline.------------------                                                       
  6082. :aline.Internet address:                                                        
  6083. :aline.CAMPBELL@MITRE.ORG                                                       
  6084. :eaddress                                                                       
  6085. :date.&sysdate                                                                  
  6086. :etitlep                                                                        
  6087. :abstract                                                                       
  6088. :p.Network News Reader/VM (NNR) gives VM users interactive access to a          
  6089. wide variety of bulletin boards, digests and interest groups. The               
  6090. contributions come from all over the globe as well as from within               
  6091. your organization.                                                              
  6092. The collective term for this type of news access is the USENET NetNews.         
  6093. You may access NNR from either the CMS environment by issuing the "NNR"         
  6094. command or from the MENUS environment via SINN (System Information              
  6095. panel, Network News).                                                           
  6096. :p.NNR allows access to the various news groups. Inherent in this access        
  6097. is the ability to read an article, print the article, save the article,         
  6098. forward the article to a colleague and post an article to the Bulletin          
  6099. Board. When you post an article to the Bulletin Board, bear in mind the         
  6100. posting represents your organization                                            
  6101. to a potentially world-wide audience.                                           
  6102. :p.Network News Reader/VM (NNR) is a client implementation of Network           
  6103. News Transfer Protocol (NNTP) a.k.a RFC 977. An excerpt from the RFC            
  6104. appears in part in Appendix B.                                                  
  6105. :toc                                                                            
  6106. :FIGLIST                                                                        
  6107. :body                                                                           
  6108. :h1.NNR Introduction                                                            
  6109. :p.Network News Reader/VM (NNR) gives VM users interactive access to a          
  6110. wide variety of bulletin boards, digests and interest groups. The               
  6111. contributions come from all over the globe as well as from inside MITRE.        
  6112. The collective term for this type of news access is the USENET NetNews.         
  6113. You may access NNR from both the CMS environment by issuing the "NNR"           
  6114. command or from the MENUS environment via SINN (System Information              
  6115. panel, Network News).                                                           
  6116. :p.NNR allows access to the various news groups. Inherent in this access        
  6117. is the ability to read an article, print the article, save the article,         
  6118. forward the article to a colleague and post an article to the Bulletin          
  6119. Board. All of these functions are somewhat innocuous except Posting to          
  6120. the network; you must bear in mind the default distribution may be world        
  6121. wide.                                                                           
  6122. :p.Network News Reader/VM (NNR) is a client implementation of Network           
  6123. News Transfer Protocol (NNTP) a.k.a RFC 977. An excerpt from the RFC            
  6124. appears in part in Appendix B.                                                  
  6125. :FIG                                                                            
  6126.                                                                                 
  6127. The format of the NNR command is:                                               
  6128.                                                                                 
  6129.      ----------------------------------------------------------------           
  6130.      |      |                                                       |           
  6131.      | NNR  |  << Argument > ( Options >                            |           
  6132.      |      |                                                       |           
  6133.      |      |  Where the argument may be a single news group        |           
  6134.      |      |  in the form "News.Group.Ext" or "p_s" which          |           
  6135.      |      |  delivers you to your Personal_Subscriptions.         |           
  6136.      |      |                                                       |           
  6137.      |      |  Where the options are:                               |           
  6138.      |      |                                                       |           
  6139.      |      |    +               +   defaults:                      |           
  6140.      |      |    | ARTICLES nnn  |     300                          |           
  6141.      |      |    | HEADERS YES/NO|     yes                          |           
  6142.      |      |    | NEWS   ALL/NEW|     new                          |           
  6143.      |      |    | DAYSBACK nn   |      7                           |           
  6144.      |      |    | LINES nnnn    |    1500                          |           
  6145.      |      |    | LOG/NOLOG     |     log                          |           
  6146.      |      |    | POST          |     N/A                          |           
  6147.      |      |    | IPADDR addr   |    System Default                |           
  6148.      |      |    +               +                                  |           
  6149.      |      |                                                       |           
  6150.      ----------------------------------------------------------------           
  6151.                                                                                 
  6152. NNR PARAMETERS                                                                  
  6153.                                                                                 
  6154.     NNR will take a news group as an argument.                                  
  6155.                                                                                 
  6156. GENERAL NNR OPTIONS                                                             
  6157.                                                                                 
  6158.   (see text for details)                                                        
  6159. :FIGCAP.NNR - INVOKE Network News Reader                                        
  6160. :eFIG                                                                           
  6161. :H2.NNR Command                                                                 
  6162. :p.The NNR command will take a news group as an argument and has a few          
  6163. options. The group must be entered in mixed case since the server is            
  6164. case sensitive. There is one exception to this rule and that is when            
  6165. passing "p_s" as a group. "p_s" may be entered in any case since this           
  6166. is not passed to the server but interpreted by NNR as a request to              
  6167. collect all information associated with Personal_Subscriptions.                 
  6168. :h2.General NNR Options                                                         
  6169. .bf help                                                                        
  6170. .fo off                                                                         
  6171.                                                                                 
  6172.  ARTICLES  - change the maximum number of articles for the Header screen.       
  6173.                                                                                 
  6174.  HEADERS   - change between headers+body and body only.                         
  6175.                                                                                 
  6176.  NEWS      - allows you to specify ALL or NEW from the command line.            
  6177.                                                                                 
  6178.  DAYSBACK  - the number of days back to collect new news groups.                
  6179.                                                                                 
  6180.  LINES     - Change the maximum number of lines per article.                    
  6181.                                                                                 
  6182.  LOG/NOLOG - A log setting for outgoing mail and posts.                         
  6183.                                                                                 
  6184.  POST      - Allows you to initiate a posting from the command line.            
  6185.                                                                                 
  6186.  IPADDR    - Enables connections to multiple servers.                           
  6187.                                                                                 
  6188. .fo on                                                                          
  6189. .pf                                                                             
  6190. :h3.Articles -                                                                  
  6191. :p.The default for the number of articles is 300. If you decide to use a        
  6192. number larger than this you may run out of virtual memory. The number of        
  6193. articles affects the behavior of the Headers screen only. You have the          
  6194. option to read the article directly without the use of the Headers              
  6195. screen. This would start you at the first available article regardless          
  6196. of the number of articles. To override this default option you could            
  6197. type the following:                                                             
  6198.                                                                                 
  6199.          "NNR ( ARTICLES 50"                                                    
  6200. :p.This will set the default for the Headers screen to the 50 most              
  6201. recent articles. If you want more than 300 you may need to "DEFINE              
  6202. STORAGE 4M" and "IPL CMS" again.                                                
  6203. :h3.Headers -                                                                   
  6204. :p.This option is for those people who would rather not see all of the          
  6205. fields associated with the header material. The headers contain                 
  6206. information related to the news group and the individual who posted the         
  6207. news. To override this you would type the following:                            
  6208.                                                                                 
  6209.          "NNR ( HEADERS NO"                                                     
  6210. :p.Additionally, at the Article level, you may toggle between                   
  6211. headers+body or body only using the PFK "HeadBody".                             
  6212. :h3.News -                                                                      
  6213. :p.The "NEWS" option is useful only when you specify a news group as an         
  6214. argument. "NEWS" with "ALL" will yield all articles for the specified           
  6215. group, "NEWS" with "NEW" will show only those articles new to you, based        
  6216. on the "Groups Read" file. You would type the following to get "ALL" the        
  6217. news ("NEW" is the default):                                                    
  6218.                                                                                 
  6219.          "NNR news.announce.newusers ( NEWS ALL"                                
  6220. :p.Please note that the news group in the above example is in lower             
  6221. case. All groups are case sensitive.                                            
  6222. :h3.Daysback -                                                                  
  6223. :p.From time to time new groups get added to the server. The "daysback"         
  6224. option allows you to override the default window for the number of days         
  6225. back you examine new groups. The default number of days back is seven;          
  6226. you may go back as many as 30.                                                  
  6227. :p.There is a pseudo group associated with this phenomenon called               
  6228. "New_Groups_Since_mm/dd/yy" where mm/dd/yy will be the date from which          
  6229. we inventory the new groups. You would type the following to check the          
  6230. new groups 30 days back:                                                        
  6231.                                                                                 
  6232.           "NNR ( DAYSBACK 30"                                                   
  6233. :h3.Lines -                                                                     
  6234. :p.The default for the number of lines per article is 1500. If you              
  6235. decide to use a number larger than this you may run out of virtual              
  6236. memory. Generally, you will find that the greater the number of lines           
  6237. specified, the more storage is required to display the article read             
  6238. (refer back to ARTICLES to see how to change storage).                          
  6239.                                                                                 
  6240.           "NNR ( LINES 1500"                                                    
  6241. :h3.Log/NoLog -                                                                 
  6242. :p.When posting an article, NNR stores a copy of your post in the               
  6243. NNRPMLOG NOTEBOOK. If you do not wish to keep a copy, specify the NOLOG         
  6244. option. This option may also be manipulated through the "U_Prefer" PFK          
  6245. on the SHLI/Groups screen.                                                      
  6246.                                                                                 
  6247.           "NNR ( NOLOG"                                                         
  6248.                                                                                 
  6249. :h3.Post -                                                                      
  6250. :p.This option will put you directly in the POST screen. You must have          
  6251. a valid group as an argument.                                                   
  6252.                                                                                 
  6253.          "NNR misc.test ( POST"                                                 
  6254. :p.Please note that the news group in the above example is in lower             
  6255. case. All groups are case sensitive.                                            
  6256. :h3.IPaddr -                                                                    
  6257. :p.NNR is generally configured to a preferred news server but                   
  6258. occasionally it will be desirable to connect to other news servers.             
  6259. The IPADDR option will allow you to override the default IP address             
  6260. for the preferred server.                                                       
  6261.                                                                                 
  6262.           "NNR ( IPADDR 000.000.000.000"                                        
  6263. :h2.Examples                                                                    
  6264. .fo off                                                                         
  6265. Sample NNR command invocations are shown below.                                 
  6266.                                                                                 
  6267.          "NNR"                                                                  
  6268.          "NNR news.announce.newusers"                                           
  6269.          "NNR news.announce.newusers ( NEWS ALL"                                
  6270.          "NNR ( ARTICLES 50"                                                    
  6271.          "NNR ( HEADERS NO"                                                     
  6272.          "NNR ( DAYSBACK 30"                                                    
  6273.          "NNR ( ARTICLES 300 HEADERS YES"                                       
  6274.          "NNR ( ARTICLES 300 LINES 1500"                                        
  6275.          "NNR ( LINES 1500 NOLOG"                                               
  6276.          "NNR news.announce.newusers ( HEADERS NO"                              
  6277.          "NNR misc.test ( POST"                                                 
  6278.          "NNR comp.compilers  ( IPADDR 000.000.000.000"                         
  6279.          "NNR p_s ( IPADDR 010.010.010.010"                                     
  6280. .fo on                                                                          
  6281.                                                                                 
  6282. :FIG                                                                            
  6283.  General Flow -                                                                 
  6284.                                                                                 
  6285.                           ----------                         -----------        
  6286.                           |  NNR   |                         | NNR p_s |        
  6287.                           ----------                         -----------        
  6288.  ------------------------      |      -----------------           |             
  6289.  | NNR group.ext ( POST |      |      | NNR group.ext |           |             
  6290.  ------------------------      |      -----------------           |             
  6291.            |              -----------         |                   |             
  6292.            |              |  PHLI   |         |                   |             
  6293.            |              -----------         |                   |             
  6294.            |                   |              |                   |             
  6295.            |          -------------------     |                   |             
  6296.            |          |All_News/New_News|     |                   |             
  6297.            |          -------------------     |                   |             
  6298.            |                   |              |                   |             
  6299.        --------           -----------         |                   |             
  6300.        | POST |           |  SHLI   |---------|-------------------|             
  6301.        --------           -----------         |                                 
  6302.                             |  |  |           |                                 
  6303.               ---------------  |  ------------|---------------                  
  6304.               |                |              |              |                  
  6305.               |                |              |              |                  
  6306.               |                |              |              |                  
  6307.        ------------       ----------     -----------    ------------            
  6308.        | ARTICLES |       |  POST  |     | HEADERS |    | U_PREFER |            
  6309.        ------------       ----------     -----------    ------------            
  6310.              |                              | | |                               
  6311.  ----------  |  ----------                  | | |                               
  6312.  |  POST  |-----|  MAIL  |                  | | |                               
  6313.  ----------     ----------                  | | |                               
  6314.                        ---------------------- | ------------------              
  6315.                        |                      |                  |              
  6316.                   ------------     ---------------------    ----------          
  6317.                   | ARTICLES |     | SELECTED_ARTICLES |    |  POST  |          
  6318.                   ------------     ---------------------    ----------          
  6319.                        |                      |                                 
  6320.                        ------------------------                                 
  6321.                                    |                                            
  6322.                        ----------  |  ----------                                
  6323.                        |  POST  |-----|  MAIL  |                                
  6324.                        ----------     ----------                                
  6325. :FIGCAP.General Flow Diagram                                                    
  6326. :eFIG                                                                           
  6327. :H1.PHLI/Main Screen                                                            
  6328. :H2.General Help -                                                              
  6329. :p.To use this screen you simply move the cursor to the desired Primary         
  6330. High Level Index (PHLI) and hit one of the Program Function Keys (PFK).         
  6331. The PHLI is the principal part of the name of a group. All groups with          
  6332. the same PHLI are related in some way. For example "mitre" represents           
  6333. all groups associated with MITRE. Positioning the cursor on top of              
  6334. "mitre" and  pressing a PFK will initiate some action. Depending on the         
  6335. PFK, you can read all the news, read only the new news or exit back to          
  6336. CMS. In addition you will have the ability to enter "SUBSET" on the             
  6337. command line and go temporarily to the CMS environment. To return to            
  6338. NNR, you must issue the command "return".                                       
  6339. :p.There are currently two special purpose PHLIs, Personal_Subscriptions        
  6340. and New_Groups_Since_mm/dd/yy. These are slightly different from the            
  6341. other PHLIs since they will only appear after explicit use of the NNR           
  6342. command. The Personal_Subscription PHLI is a collection of all the              
  6343. groups you have subscribed to either overtly using the "Sub/UnS" PFK or         
  6344. simply by reading an article within a group while in "New_News". The            
  6345. New_Groups_Since... PHLI is a collection of groups that are new to the          
  6346. server (according to the value of the DAYSBACK option).                         
  6347. :p.In addition to the predefined PHLIs (Personal_Subscriptions                  
  6348. and New_Groups_Since_mm/dd/yy) there is an ability to define your               
  6349. own. Depicted in the sample PHLI you will notice number of entries              
  6350. prefixed by "Personal_". As stated earlier "Subscriptions" is predefined        
  6351. and will always appear on this screen. The other entries such as "Test"         
  6352. and "VM" are user defined and built. These pseudo PHLI will remain              
  6353. as long as there are groups associated with them. You will also notice          
  6354. that a group can appear in both the "Subscriptions" list and one other          
  6355. user defined list. To define a pseudo PHLI use the "U_Prefer" screen            
  6356. and to add an entry use the Sub/UnS PFK (on SHLI screen).                       
  6357. :p.On all of the screens described the "enter" key will toggle                  
  6358. the cursor between the command line and the current cursor position.            
  6359. If you are familiar with previous versions of NNR you may have                  
  6360. discovered the "Cursor" PFK has disappeared. We set this up to conserve         
  6361. on PFKs. This function is intended to give you fast access to the               
  6362. command line for issuing the "SUBSET" command so you may drop into a CMS        
  6363. subset. In order to return from the subset you need to type "return".           
  6364. :h2.Help -                                                                      
  6365. :p.The Help PFK will display the following information:                         
  6366.                                                                                 
  6367. .bf help                                                                        
  6368. .fo off                                                                         
  6369.   Primary High Level Index and PFK definitions. CMS SUBSET is honored.          
  6370.   ENTER toggles cursor position.                                                
  6371. Personal_Subscriptions - All those groups you are currently subscribed          
  6372.                          to. Treated the same as other HLIs.                    
  6373. New_Groups_Since_mm/dd/yy - All new groups since you last read the news         
  6374.                             or  7-30 DAYSBACK.                                  
  6375. news         - Description of news programs, etiquette and announcements.       
  6376. mitre        - Contains all mitre related groups.                               
  6377. PFK Help     - This display.                                                    
  6378. PFK All_News - Access all the news that is available. Articles read are         
  6379.                not remembered. Move cursor to desired topic and press           
  6380.                All_News PFK.                                                    
  6381. PFK Quit     - Exit NNR program.                                                
  6382. PFK New_News - Access news that is new to you according to "Groups Read"        
  6383.                file on your account. Articles read are remembered.              
  6384. PFK Backward - Scrolls backward one screen.                                     
  6385. PFK Forward  - Scrolls forward one screen.                                      
  6386. .pf                                                                             
  6387. :FIG place='inline'                                                             
  6388.                        *** NNR/VM (R_1.3.0) ***                       PHLI/Main 
  6389.   High Level Index                                                              
  6390.  New_Groups_Since_05/04/92|  comp                     |  pubnet                 
  6391.  Personal_Subscriptions   |  compusec                 |  rec                    
  6392.  Personal_BBoardsEtc      |  control                  |  sci                    
  6393.  Personal_News            |  dc                       |  soc                    
  6394.  Personal_Sources         |  ddn                      |  su                     
  6395.  Personal_Tests           |  general                  |  talk                   
  6396.  Personal_VM              |  gnu                      |  test                   
  6397.  Personal_Languages       |  ieee                     |  to                     
  6398.  Personal_My.Clari        |  junk                     |  trial                  
  6399.  Personal_Networking      |  k12                      |  ucb                    
  6400.  Personal_MITRE           |  md                       |  unix-pc                
  6401.  alt                      |  misc                     |  va                     
  6402.  ba                       |  mitre                    |  vmsnet                 
  6403.  bionet                   |  na                       |                         
  6404.  bit                      |  ne                       |                         
  6405.  biz                      |  news                     |                         
  6406.  ca                       |  nj                       |                         
  6407.  clari                    |  ny                       |                         
  6408.                                                                                 
  6409.  1= Help     2= All_News 3= Quit      4= New_News  5=           6=              
  6410.  7= Backward 8= Forward  9=          10=          11=          12=              
  6411. ====>                                                                           
  6412. :FIGCAP.Sample PHLI/Main screen                                                 
  6413. :eFIG                                                                           
  6414. :h2.All_News -                                                                  
  6415. .fo on                                                                          
  6416. :p.Allows a user to review all the news associated with a high level            
  6417. index regardless of the articles previously read for any one group. For         
  6418. example if you have been following "comp.compilers", you may have read an       
  6419. article that is associated with the article you are currently reading.          
  6420. You might use this function to get all the available news for                   
  6421. "comp.compilers" and then search for the desired articles (see Sample           
  6422. Headers Screen).                                                                
  6423. :h2.Quit -                                                                      
  6424. Quitting from the Primary High Level Index will exit the NNR program.           
  6425. Upon termination, NNR will try to save session information in the file          
  6426. "Groups Read". You will notice that the file name and type are in mixed         
  6427. case. This is done so you do not inadvertently erase or destroy the             
  6428. file. The content of the Groups Read file determines where you will             
  6429. start reading a specific news group.                                            
  6430. :h2.New_News -                                                                  
  6431. :p.New_News will attempt to remember every article read. If for example         
  6432. you are following "comp.compilers", every time you read an article,             
  6433. whether from the Headers screen, Selected_Articles screen or from the           
  6434. Articles PFK on the SHLI screen, the number of the last article read is         
  6435. recorded.                                                                       
  6436. :h2.Backward -                                                                  
  6437. :p.Scrolls the screen backward.                                                 
  6438. :h2.Forward-                                                                    
  6439. :p.Scrolls the screen forward.                                                  
  6440. :h1.SHLI/Group Screen                                                           
  6441. :h2.General Help -                                                              
  6442. :p.To use this screen you simply move the cursor to the desired                 
  6443. Secondary High Level Index (SHLI) and hit one of the Program Function           
  6444. Keys (PFK). The SHLI is better known as a group or a news group. Each           
  6445. news group is comprised of articles. The number of articles and posting         
  6446. information accompanies each group. You may check out a particular group        
  6447. from this screen using the PFKs below.                                          
  6448. :p.You will notice that some of the groups are highlighted and some are         
  6449. not. A group becomes highlighted when you subscribe "Sub/UnS" or read the       
  6450. group while in "New_News". This highlighted group will eventually appear        
  6451. in your Personal_Subscriptions group, but it will take a new session to         
  6452. record it.                                                                      
  6453. :p.The "Power" feature that you see in the upper left corner of this            
  6454. screen indicates whether you have entered the Power Read mode. By               
  6455. default the power mode is "OFF". See the "Power" PFK information for            
  6456. more details.                                                                   
  6457. :FIG place='inline'                                                             
  6458.                        *** NNR/VM (R_1.3.0) ***                     SHLI/Groups 
  6459.  Power OFF(Groups=1/351)                                                        
  6460.  comp.admin.policy               41  y | comp.binaries.ibm.pc.d         100  y  
  6461.  comp.ai                         67  y | comp.binaries.ibm.pc.wanted    151  y  
  6462.  comp.ai.edu                      1  y | comp.binaries.mac               29  m  
  6463.  comp.ai.neural-nets             33  y | comp.binaries.os2               87  m  
  6464.  comp.ai.nlang-know-rep           0  m | comp.bugs.misc                   0  y  
  6465.  comp.ai.philosophy             155  y | comp.bugs.sys5                   5  y  
  6466.  comp.ai.shells                   7  y | comp.bugs.2bsd                  18  y  
  6467.  comp.ai.vision                   1  m | comp.bugs.4bsd                  11  y  
  6468.  comp.arch                       87  y | comp.bugs.4bsd.ucb-fixes         0  m  
  6469.  comp.archives                  267  m | comp.cog-eng                    50  y  
  6470.  comp.archives.admin             47  y | comp.compilers                  46  m  
  6471.  comp.benchmarks                 19  y | comp.compression                73  y  
  6472.  comp.binaries.acorn             16  m | comp.databases                  10  y  
  6473.  comp.binaries.amiga              0  m | comp.databases.informix         30  y  
  6474.  comp.binaries.apple2            13  y | comp.dcom.fax                   37  y  
  6475.  comp.binaries.atari.st          22  m | comp.dcom.lans                  66  y  
  6476.  comp.binaries.ibm.pc            14  m | comp.dcom.lans.ethernet         21  y  
  6477.  comp.binaries.ibm.pc.archive    80  y | comp.dcom.lans.fddi             14  y  
  6478.                                                                                 
  6479.  1= Help     2= Articles 3= Quit      4= Headers   5= Post      6= Mark         
  6480.  7= Backward 8= Forward  9= Sub/UnS  10= UpdtGrp  11= U_Prefer 12= Power        
  6481. ====>                                                                           
  6482. :FIGCAP.Sample SHLI/Groups Screen                                               
  6483. :eFIG                                                                           
  6484. .pa                                                                             
  6485. :h2.Help -                                                                      
  6486. :p.The Help PFK will display the following information:                         
  6487.                                                                                 
  6488. .bf help                                                                        
  6489. .fo off                                                                         
  6490.   Move the cursor to a group and press Headers, Articles or Post PFK.           
  6491.   CMS SUBSET is honored. ENTER toggles cursor position.                         
  6492.                                                                                 
  6493. PFK Help     - This display.                                                    
  6494. PFK Articles - Access articles sequentially by article number. Starts with      
  6495.                the first available article. Cursor position respected.          
  6496. PFK Quit     - Exits this screen.                                               
  6497. PFK Headers  - Preferred path to articles. Collects subject and other           
  6498.                information for display. Cursor position respected.              
  6499. PFK Post     - Initiates posting procedure. Only group passed to the            
  6500.                posting screen. Cursor position respected.                       
  6501. PFK Mark     - Mark the group as been read, zeros the article count.            
  6502. PFK Backward - Scrolls backward one screen.                                     
  6503. PFK Forward  - Scrolls forward one screen.                                      
  6504. PFK UpdtGrp  - Updates the Group.                                               
  6505. PFK Sub/UnS  - Subscribe or UnSubscribe to a news group.                        
  6506. PFK U_Prefer - Tailor user environment.                                         
  6507. PFK Power    - Toggle between current Power setting. Initially OFF.             
  6508. .pf                                                                             
  6509. :h2.Articles -                                                                  
  6510. .fo on                                                                          
  6511. :p.The Articles function will behave differently depending on how you           
  6512. arrived at this screen. If you had selected All_News on the main screen         
  6513. you will get the first available article known to the server for the            
  6514. selected group. If you had previously selected New_News then you would          
  6515. find yourself reading the next available article based on your "Groups          
  6516. Read" file. In all cases you will be dropped into a full screen dialog          
  6517. where you may read the first article. From within the article, there are        
  6518. a variety of options; see the Article Screen for details.                       
  6519. :h2.Quit -                                                                      
  6520. :p.Quitting here will not exit the NNR program. There is a hierarchical         
  6521. relationship among routines. Whenever you QUIT a screen you will return         
  6522. to the place you started from. In this case you will be returned to the         
  6523. PHLI screen where you will be able to select another PHLI function or           
  6524. QUIT the NNR program.                                                           
  6525. :h2.Headers -                                                                   
  6526. :p.Selecting Headers here will collect information about all articles           
  6527. available from the server, based on whether All_News or New_News was            
  6528. previously selected. In any case you will see who the article was from,         
  6529. a "." and the subject (see the Headers screen chapter). The subject             
  6530. string is actually a variable parameter which may be changed using              
  6531. "U_Prefer". For example, if you want to read the group "junk", then             
  6532. using the subject is not very useful, but changing "subject" to                 
  6533. "newsgroups" (on the U_Prefer Screen) would yield much more information         
  6534. about the content of this group.                                                
  6535. :h2.Post -                                                                      
  6536. :p.Posting from this screen will supply only the group to be posted to.         
  6537. You will have to supply the subject. There are two other screens where          
  6538. posting is an option, the Headers screen and the Article screen (refer          
  6539. to these sections).                                                             
  6540. :h2.Mark -                                                                      
  6541. :p.The Mark PFK, when reading in the "New_News" mode, will bring the            
  6542. group up to date or "mark" it as read. For example, if you move the             
  6543. cursor to "comp.compilers" and hit the "Mark" PFK you will see the              
  6544. displayed number of articles change to "0". Now when you see the article        
  6545. count change from "0" there will be new articles to be read.                    
  6546. :p.This PFK is unavailable while in "All_News"                                  
  6547. and will not be displayed.                                                      
  6548. :h2.Backward -                                                                  
  6549. :p.This PFK will allow you to move backward through all the groups.             
  6550. There is a top and a bottom to the groups displayed; it does not wrap           
  6551. around. Also notice that the groups are displayed in two columns, the           
  6552. bottom of column 1 leads to the top of column 2. A message will be              
  6553. displayed at the logical top of all the groups associated with the              
  6554. SHLI/Groups.                                                                    
  6555. :h2.Forward -                                                                   
  6556. :p.This PFK will allow you to move forward through all the groups. There        
  6557. is a top and a bottom to the groups displayed; it does not wrap around.         
  6558. Also notice that the groups are displayed in two columns, the bottom of         
  6559. column 1 leads to the top of column 2. A message will be displayed at           
  6560. the logical bottom of all the groups associated with the SHLI/Groups.           
  6561. :h2.UpdtGrp -                                                                   
  6562. :p.When pressed this PFK will check with the server to see if there is          
  6563. any additional news for the associated group. In the event that there           
  6564. is additional news you should see the number of articles increase.              
  6565. :p.There is also an "update" command that may be used from the                  
  6566. command line that will update all groups in the SHLI. This is a handy           
  6567. command for repairing any damage to your Personal_Subscriptions SHLI.           
  6568. The update command will work in "All_News" and "New_News".                      
  6569. :h2.Sub/UnS -                                                                   
  6570. :p.Sub/UnS (Subscribe/UnSubscribe) will either subscribe you to a news          
  6571. group or unsubscribe from a news group, depending on whether or not you         
  6572. are currently subscribed. If you have defined a pseudo PHLI (via the            
  6573. U_Prefer Screen) you will also be adding the group to your user defined         
  6574. PHLI as well as to the Personal_Subscriptions PHLI. When adding or              
  6575. deleting groups from any of the "Personal_*" PHLIs you should see that          
  6576. the process is dynamic, that the number of groups within a PHLI will            
  6577. increase as you subscribe and decrease as you unsubscribe. With the             
  6578. user defined PHLIs it is possible to eliminate a PHLI by                        
  6579. unsubscribing all the groups. A user defined PHLI is created by                 
  6580. subscribing to the first group after definition on the "U_Prefer"               
  6581. screen.                                                                         
  6582. :p.This PFK is unavailable while in "All_News"                                  
  6583. and will not be displayed.                                                      
  6584. :h2.U_Prefer -                                                                  
  6585. :P.You have the ability to change some of the NNR defaults set by your          
  6586. system administrator through the "U_Prefer" Screen. All of these                
  6587. settings may also be changed on the command line at NNR invocation.             
  6588. The settings for LINES and ARTICLES are determined as suitable for the          
  6589. average virtual memory size at your site. Changes to these settings             
  6590. should be made with the understanding that NNR may run out of storage           
  6591. when collecting too many articles on the Headers Screen or reading large        
  6592. articles (too many lines). See the U_Prefer Screen for more details.            
  6593. :h2.Power -                                                                     
  6594. :p.Power reading was set up for those individuals who use the "Articles"        
  6595. PFK from this screen. When Power is toggled ON you have the ability             
  6596. to read all the news for the selected SHLI/Group using only the "Next"          
  6597. PFK on the Article Screen. When you issue the "Articles" PFK and start          
  6598. reading all the available articles, Power ON means that there is an             
  6599. implied "NxtGroup" in effect ("NxtGroup" locates the next group in the          
  6600. SHLI list). So when you exhaust all the articles for the current group,         
  6601. NNR will locate the next group and start you at its first article. This         
  6602. function is best suited for the "Personal_Subscriptions" in "New_News"          
  6603. mode.                                                                           
  6604. :h1.Headers Screen                                                              
  6605. :h2.General Help -                                                              
  6606. :p.To use this screen you simply move the cursor to the desired article         
  6607. and use a Program Function Key (PFK) or replace the "." with any                
  6608. character and use the Selected_Articles function. In the following              
  6609. figure notice the "X" which has replaced the ".". Used in conjunction           
  6610. with the Selected_Articles function it would drop you into the article          
  6611. indicated by the X. You may mark as may articles as you wish. Also              
  6612. notice the "*"; this is an indication that you have read this article           
  6613. during the current session or a previous session (NNR attempts to               
  6614. remember articles read while in "New_News").                                    
  6615. :p.On the Headers Screen in the upper left corner you will notice               
  6616. "R 0" as an initial setting. This is a "Reduce" indicator, which counts         
  6617. the number of times you have issued the Reduce PFK. Use the Quit PFK            
  6618. to bring it back to zero.                                                       
  6619. :p.The CMS "SUBSET" command is also honored from this screen.                   
  6620.                                                                                 
  6621.                                                                                 
  6622. :FIG place='inline'                                                             
  6623.   R 0                  *** NNR/VM (R_1.3.0) ***                         Headers 
  6624.  comp.admin.policy (Articles=1/41)                                              
  6625.  mpye@vmsb.is.csupomo X Re: SPA -- what are your rights?                        
  6626.  tinsel@uiuc.edu (Tho . Re: SPA -- what are your rights?                        
  6627.  andy@homebase.vistac . Re: SPA -- what are your rights?                        
  6628.  jet@karazm.math.uh.e . Administration in a research environment -- survey      
  6629.  john@iastate.edu (Jo * Re: Administration in a research environment -- survey  
  6630.  paw@coos.dartmouth.e . Re: Temperature of computer labs                        
  6631.  ryan@eas.gatech.edu  . Re: A question of ethics                                
  6632.  michael@resonex.com  . Re: SPA -- what are your rights?                        
  6633.  jkp@cs.HUT.FI (Jyrki . Re: SPA -- what are your rights?                        
  6634.  kadie@eff.org (Carl  . Abstract of CAF-News 02.18                              
  6635.  paris@zygon.dev.cdx. . Re: Administration in a research environment -- survey  
  6636.  kadie@eff.org (Carl  . Administration in a research environment -- survey      
  6637.  john@iastate.edu (Jo . Re: Administration in a research environment -- survey  
  6638.  anselmo-ed@cs.yale.e . Re: Administration in a research environment -- survey  
  6639.  sbarber@panix.com (S . Re: SPA -- what are your rights?                        
  6640.  sck@watson.ibm.com ( . Re: Administration in a research environment -- survey  
  6641.  michael@resonex.com  . Re: SPA -- what are your rights?                        
  6642.  ptownson@eecs.nwu.ed . Re: SPA -- what are your rights?                        
  6643.                                                                                 
  6644.  1= Help     2= Article  3= Quit      4= Selected  5= Post      6= Mrk2Here     
  6645.  7= Backward 8= Forward  9= Thread   10= Reduce   11= Mrk/UMrk 12= NxtGroup     
  6646. ====>                                                                           
  6647. :FIGCAP.Sample Headers Screen                                                   
  6648. :eFIG                                                                           
  6649. :h2.Help -                                                                      
  6650. :p.The Help PFK will display the following information:                         
  6651.                                                                                 
  6652. .bf help                                                                        
  6653. .fo off                                                                         
  6654.   This screen collects pertinent info. from each article to display the         
  6655.   originator and something about the content, based on the selection            
  6656.   criteria (subject). CMS SUBSET honored; ENTER toggles cursor position.        
  6657. PFK Help     - This display.                                                    
  6658. PFK Article  - Read a specific article. Cursor position respected.              
  6659. PFK Quit     - Exit Headers screen.                                             
  6660. PFK Selected - Mark each article at the "." with an "x". Mark as many as        
  6661.                desired, then press the Selected PFK.                            
  6662. PFK Post     - Initiates posting procedure. The group and subject are           
  6663.                passed to the posting screen. Cursor position respected.         
  6664. PFK Mrk2Here - Marks all articles as read up to the cursor position or          
  6665.                when cursor is on Command line, ALL articles are marked.         
  6666. PFK Backward - Scrolls backward one screen.                                     
  6667. PFK Forward  - Scrolls forward one screen.                                      
  6668. PFK Thread   - Collects articles based on subject.                              
  6669. PFK Reduce   - Eliminates read articles, "reduces" the number displayed.        
  6670. PFK Mrk/UMrk - Mark Article/UnMark Article toggle.                              
  6671. PFK NxtGroup - Moves to the next group in the SHLI list.                        
  6672. .pf                                                                             
  6673. :h2.Article -                                                                   
  6674. .fo on                                                                          
  6675. :p.The Article function will behave differently depending on how you            
  6676. arrived at this screen. If you had selected All_News you will get the           
  6677. first available article known to the server for the selected group. If          
  6678. you had previously selected New_News then you would find yourself               
  6679. reading the next available article based on your "Groups Read" file.            
  6680. :h2.Quit -                                                                      
  6681. :p.Quitting here will not exit the NNR program. There is a hierarchical         
  6682. relationship among routines. Whenever you QUIT a screen you will return         
  6683. to the place you started from. In this case you will be returned to the         
  6684. SHLI screen where you will be able to select another group.                     
  6685. :h2.Selected_Articles -                                                         
  6686. :p.You may select several articles from many screens by putting a               
  6687. character in the "." column on any line. Once all the articles that you         
  6688. want to read are flagged, issue the Selected_Articles function.                 
  6689. :h2.Post -                                                                      
  6690. :p.Posting from this screen will supply the group to be posted to as            
  6691. well as the subject. The subject line will be slightly modified to              
  6692. indicate that the posting is a reply. See PostMail (Post Screen(2)).            
  6693. :h2.Mrk2Here -                                                                  
  6694. :p.Marks all articles up to the cursor position as read. This is only           
  6695. permissible while in "New_News" and                                             
  6696. will not be displayed while in "All_News".                                      
  6697.                                                                                 
  6698. *Note: Mrk2Here will also mark all                                              
  6699. the articles in the current Group as read, when issued while the cursor         
  6700. is on the command line.                                                         
  6701. :h2.Backward -                                                                  
  6702. :p.This PFK will allow you to move backward through all the Headers. You        
  6703. will find that there is a top and a bottom to the Headers displayed; it         
  6704. will not wrap around.                                                           
  6705. :h2.Forward -                                                                   
  6706. :p.This PFK will allow you to move forward through all the Headers. You         
  6707. will find that there is a top and a bottom to the Headers displayed; it         
  6708. will not wrap around.                                                           
  6709. :h2.Thread -                                                                    
  6710. :p.This is an effort to associate articles based on similar subjects.           
  6711. The "Thread" PFK will examine all articles currently in the headers             
  6712. display and group similar articles together. These articles will not be         
  6713. remembered as being read. Place the cursor anywhere on a line with the          
  6714. subject of interest and issue the Thread function.                              
  6715. :h2.Reduce -                                                                    
  6716. :p.This PFK will eliminate articles from the display that have been             
  6717. read. An asterisk appearing in the cursor column is an indication that          
  6718. you have read this article. When you press the "Reduce" function all            
  6719. articles with an asterisk are eliminated from view. You will also notice        
  6720. an "R 1" in the upper left corner of the display. This is an indication         
  6721. of the number of reductions done on the screen. It is advisable to limit        
  6722. your reductions to one per session. When you attempt to QUIT from a             
  6723. screen "reduced" by either the Thread or Reduce functions, the full             
  6724. screen as originally viewed will return first, then you may QUIT in the         
  6725. normal way.                                                                     
  6726. :h2.Mrk/UMrk -                                                                  
  6727. :p.Mark Article/UnMark Article toggle. Mark a specific article as having        
  6728. been read or UnMark it. You will see that the asterisk and period               
  6729. characters toggle as well. This is only permissible while in the                
  6730. "New_News" mode and                                                             
  6731. will not be displayed while in "All_News".                                      
  6732. :p.This PFK is unavailable while in "All_News".                                 
  6733. :h2.NxtGroup -                                                                  
  6734. :p.This PFK will move you to the next available group according to the          
  6735. SHLI list you are currently in. When you reach the last group on the            
  6736. list you will automatically go back to the SHLI Screen. "NxtGroup"              
  6737. will skip over all the groups with zero articles.                               
  6738. :h1.U_Prefer Screen                                                             
  6739. :h2.General Help -                                                              
  6740. :p.The User Preferences Screen attempts to make NNR more useful in              
  6741. irregular situations (normally none of the User configurable parameters         
  6742. should need changing). The Header Screen option is changed by the Rotate        
  6743. PFK; the other values must be filled in. Once any of the values are             
  6744. changed they will retain their setting for the duration of the NNR              
  6745. session or until changed again. The values will be reset to the default         
  6746. on the next invocation of NNR.                                                  
  6747. :p.The line "Set Current Personal HLI Qualifier (OFF): OFF" will                
  6748. allow a user to create Personal PHLIs. By changing the default setting          
  6749. to something other than "OFF" (or "Subscriptions") you will start the           
  6750. process of adding groups to both the newly defined PHLI and to                  
  6751. Personal_Subscriptions. This mechanism is case sensitive ("XYZ", "XyZ"          
  6752. and "xYz" would be valid and distinct personal pseudo PHLIs).                   
  6753.                                                                                 
  6754. :FIG place='inline'                                                             
  6755.                        *** NNR/VM (R_1.3.0) ***                User Preferences 
  6756.                                                                                 
  6757.                                                                                 
  6758.                                                                                 
  6759.                                                                                 
  6760.   Use PF12 to Rotate value for Header Screen display: Subject                   
  6761.                                                                                 
  6762.   Maximum number of Articles/Group(300): 300                                    
  6763.                                                                                 
  6764.   Maximum number of Lines/Article(1500): 1500                                   
  6765.                                                                                 
  6766.   Log outgoing POSTings and MAIL(YES/NO): YES                                   
  6767.                                                                                 
  6768.   Set Current Personal HLI Qualifier (OFF): OFF                                 
  6769.                                                                                 
  6770.                                                                                 
  6771.                                                                                 
  6772.                                                                                 
  6773.                                                                                 
  6774.                                                                                 
  6775.                                                                                 
  6776.  1= Help     2=          3= Quit      4=           5=           6=              
  6777.  7=          8=          9=          10=          11=          12= Rotate       
  6778. ====>                                                                           
  6779. :FIGCAP.Sample U_Prefer Screen                                                  
  6780. :eFIG                                                                           
  6781. .pa                                                                             
  6782. :h2.Help -                                                                      
  6783. :p.The Help PFK will display the following information:                         
  6784.                                                                                 
  6785. .bf help                                                                        
  6786. .fo off                                                                         
  6787.   You may change any of the values listed but do so carefully since it          
  6788.   is possible to run out of virtual storage!                                    
  6789.                                                                                 
  6790. Articles/Group - used to determine the upper limit for the number of            
  6791.   articles collected on the "Headers Screen". Default is 300 articles.          
  6792. Lines/Article - used to determine the upper limit for the number of lines       
  6793.   collected for an article on the "Article Screen". Default is 1500 lines.      
  6794. Log/NoLog - you may switch between logging all outgoing mail/post and           
  6795.   not logging them. The default is "YES", log them.                             
  6796. Add Pseudo PHLI - used in conjunction with the Sub/UnSub PFK on the SHLI        
  6797.   screen. The default is OFF, change this to any name and use the               
  6798.   Sub/UnSub PFK to add groups to the newly defined PHLI.                        
  6799.                                                                                 
  6800.                                                                                 
  6801.                                                                                 
  6802. PFK Help     - This display.                                                    
  6803. PFK Quit     - Exit Preferences screen.                                         
  6804. PFK Rotate   - Range through possible configuration values.                     
  6805. .pf                                                                             
  6806. :h2.Quit -                                                                      
  6807. .fo on                                                                          
  6808. :p.Quitting here will not exit the NNR program. There is a hierarchical         
  6809. relationship among routines. Whenever you QUIT a screen you will return         
  6810. to the place you started from. In this case you will be returned to             
  6811. either the SHLI/Group or the Header screen.                                     
  6812. :h2.Rotate -                                                                    
  6813. :p.This PFK will walk through all the possible configuration values for         
  6814. a display field. You may check if a display field on the screen will            
  6815. "Rotate" by moving the cursor to the desired field and pressing the             
  6816. Rotate PFK. You will either see the next value or an error message              
  6817. indicating that the PFK doesn't work there.                                     
  6818. :h1.Article Screen                                                              
  6819. :h2.General Help -                                                              
  6820. :p.There are three ways to get to this screen. The first is by                  
  6821. selecting the "Articles" PFK for a specific group from the SHLI/Group           
  6822. screen. This would place you at the first available article depending on        
  6823. your "Groups Read" file if you have come by way of New_News, or the very        
  6824. first article available to the network if you have come by way of               
  6825. All_News. A second path would be via the Headers screen. The article            
  6826. selected in this case would depend on the cursor position. The article          
  6827. directly under the cursor would be the article selected when the                
  6828. "Article" function is pressed. The cursor could be placed anywhere on           
  6829. the line to get the desired article. The third way is also from the             
  6830. Headers screen. It takes an alternate path to the Article screen via the        
  6831. Selected_Article key. Prior to executing this function you should have          
  6832. marked an article to be read by placing any character in the "." column.        
  6833. You may do this for any article within the group, for as many articles          
  6834. as you wish.                                                                    
  6835.                                                                                 
  6836.                                                                                 
  6837. :FIG place='inline'                                                             
  6838.                        *** NNR/VM (R_1.3.0) ***                         Article 
  6839.  #720 OSF Newsletter - June 1991                                                
  6840.  mitre.techbb (Lines=1/1607)                                                    
  6841. * * * Top of File * * *                                                         
  6842. Newsgroups: mitre.techbb                                                        
  6843. Path: linus!daemon                                                              
  6844. From: tkb@mbunix.mitre.org                                                      
  6845. Subject: OSF Newsletter - June 1991                                             
  6846. Message-ID: <1991Jun27.122152.18763@linus.mitre.org>                            
  6847. Sender: daemon@linus.mitre.org                                                  
  6848. Organization: The MITRE Corp.  Mail to News relay                               
  6849. Distribution: mitre                                                             
  6850. Date: Thu, 27 Jun 1991 12:21:52 GMT                                             
  6851. Lines: 1595                                                                     
  6852.                                                                                 
  6853.                                                                                 
  6854.                                                                                 
  6855. To:   OSF Members                                                               
  6856.                                                                                 
  6857. From:     corpcom@osf.org (OSF Corporate Communications                         
  6858.                            Open Software Foundation)                            
  6859.  1= Help     2= Next     3= Quit      4= Previous  5= PostMail  6= HeadBody     
  6860.  7= Backward 8= Forward  9= Print    10= Rot13    11= Log      12= NxtGroup     
  6861. ====>                                                                           
  6862. :FIGCAP.Sample Article Screen                                                   
  6863. :eFIG                                                                           
  6864. .pa                                                                             
  6865. :h2.Help -                                                                      
  6866. :p.The Help PFK will display the following information:                         
  6867.                                                                                 
  6868. .bf help                                                                        
  6869. .fo off                                                                         
  6870.   Most commands honored from the command line. I try to screen out              
  6871.   commands known to be disruptive to your NNR session.                          
  6872.                                                                                 
  6873. PFK Help     - This display.                                                    
  6874. PFK Next     - Read the next article in the sequence.                           
  6875. PFK Quit     - Exit Article screen.                                             
  6876. PFK Previous - Read the previous article in the sequence.                       
  6877. PFK PostMail - Initiates posting procedure. The group and subject are           
  6878.                passed to the posting screen along with the article.             
  6879. PFK HeadBody - Toggles between headers+body and body only.                      
  6880. PFK Backward - Scrolls backward one screen.                                     
  6881. PFK Forward  - Scrolls forward one screen.                                      
  6882. PFK Print    - Sends the article to the virtual printer.                        
  6883. PFK Rot13    - Translate screen using a character rotation method.              
  6884. PFK Log      - Logs article in NNRLOG NOTEBOOK.                                 
  6885. PFK NxtGroup - Moves to the next group in the SHLI list.                        
  6886. .pf                                                                             
  6887. :h2.Next -                                                                      
  6888. .fo on                                                                          
  6889. :p.Next will move you to the next available article, regardless of how          
  6890. you have reached this point. You may read all remaining articles. Once          
  6891. the last article is read you will return automatically to the previous          
  6892. screen.                                                                         
  6893. :h2.Quit -                                                                      
  6894. :p.Quitting here will not exit the NNR program. There is a hierarchical         
  6895. relationship among routines. Whenever you QUIT a screen you will return         
  6896. to the place you started from. In this case you will be returned to             
  6897. either the SHLI/Group or the Header screen.                                     
  6898. :h2.Previous -                                                                  
  6899. :p.The Previous function will move you to the previous article,                 
  6900. regardless of how you have reached this point. You may go back for as           
  6901. many articles as you wish, depending on the selection criteria.                 
  6902. :h2.PostMail -                                                                  
  6903. :p.Posting from this screen will supply the group to be posted to, the          
  6904. subject and the content of the article. See PostMail (Post Screen(1)).          
  6905. :h2.Headbody -                                                                  
  6906. :p.HeadBody is an article headers+body/body only toggle. If you are             
  6907. viewing both header and body you toggle to body only. If you are viewing        
  6908. body only you toggle to headers+body. The value of the NNR "Headers"            
  6909. option determines the setting initially. Once set, the setting remains          
  6910. in effect for the entire session but you may toggle as often as you             
  6911. like.                                                                           
  6912. :H2.Backward -                                                                  
  6913. :p.This PFK will allow you to move backward through all the Articles.           
  6914. You will find that there is a top and a bottom to the Articles displayed        
  6915. and it will not wrap around.                                                    
  6916. :h2.Forward -                                                                   
  6917. :p.This PFK will allow you to move forward through all the Articles. You        
  6918. will find that there is a top and a bottom to the Articles displayed and        
  6919. it will not wrap around.                                                        
  6920. :h2.Print -                                                                     
  6921. :p.Print will spool the current article to your virtual printer. Upon           
  6922. exiting NNR the content of your virtual printer will be directed to your        
  6923. preferred system printer and will print under one banner.                       
  6924. :h2.Rot13 -                                                                     
  6925. :p.There is a popular method of encoding some material included in some         
  6926. articles. The "Rot13" (Rotate 13 characters) PFK will attempt to decode         
  6927. them.                                                                           
  6928. :h2.Log -                                                                       
  6929. :p.Use LOG to save an article in a CMS notebook. The LOG command is also        
  6930. available from the command line. Once the articles are logged you may           
  6931. then use the RMAIL/MAILBOOK facility against them.                              
  6932. :h2.NxtGroup -                                                                  
  6933. :p.This PFK will move you to the next available group according to the          
  6934. SHLI list you are currently in. When you reach the last group on the            
  6935. list you will automatically go back to the SHLI Screen. "NxtGroup"              
  6936. will skip over all the groups with zero articles.                               
  6937. :h1.PostMail                                                                    
  6938. :h2.Post Screen(1)                                                              
  6939. :h3.General Help -                                                              
  6940. :p.This is a simple mailer/poster. It is comprised of two                       
  6941. screens, Post Screen(1) and Post Screen(2). The first screen will be            
  6942. encountered when coming from the Article screen and when NNR detects            
  6943. that there is an unfinished article that was started sometime earlier.          
  6944. From this screen you determine the course of your reply; you may send it        
  6945. to a colleague, follow-up to the news server or reply back to the               
  6946. sender.                                                                         
  6947. :p.The second screen you may encounter (from the Headers or Group               
  6948. Screen) will give you an opportunity to change some of the captured             
  6949. information and in the case of forwarding the article ("Mail" PFK) you          
  6950. will be called upon to type in the recipient's electronic address (See          
  6951. Post Screen(2) Help).                                                           
  6952.                                                                                 
  6953.                                                                                 
  6954. :FIG place='inline'                                                             
  6955.                        *** NNR/VM (R_1.3.0) ***                         Post(1) 
  6956.                                                                                 
  6957.    Posting proceeds in stages. Stage 1 (this stage) requires you to             
  6958.    select how the article is to be manipulated. Please select one of            
  6959.    the PFKs listed below.                                                       
  6960.                                                                                 
  6961.  Newsgroups: mitre.techbb                                                       
  6962.  Path: linus!daemon                                                             
  6963.  From: M00000@mwvm.mitre.org (J. MITRE User)                                    
  6964.  Subject: OR/MS Symposium                                                       
  6965.  Message-ID: <1991Oct15.114046.25682@linus.mitre.org>                           
  6966.  Sender: daemon@linus.mitre.org                                                 
  6967.  Organization: The MITRE Corp.  Mail to News relay                              
  6968.  Distribution: mitre                                                            
  6969.  Date: Tue, 15 Oct 1991 11:40:46 GMT                                            
  6970.  Lines: 41                                                                      
  6971.                                                                                 
  6972.                                                                                 
  6973.                                                                                 
  6974.                                                                                 
  6975.                                                                                 
  6976.  1= Help     2=          3= Quit      4=           5=           6= Resume       
  6977.  7=          8=          9= Followup 10= Mail     11= Reply    12= ERASE        
  6978. ====>                                                                           
  6979. :FIGCAP.Sample Post Screen(1)                                                   
  6980. :eFIG                                                                           
  6981. .pa                                                                             
  6982. :h3.Help -                                                                      
  6983. :p.The Help PFK will display the following information:                         
  6984.                                                                                 
  6985. .bf help                                                                        
  6986. .fo off                                                                         
  6987.   You must come from the Article screen to get to Post Screen(1). This          
  6988.   screen allows you to determine how to redirect an article.                    
  6989.                                                                                 
  6990.                                                                                 
  6991. PFK Help     - This Display.                                                    
  6992. PFK Quit     - Exit Post(1) screen.                                             
  6993. PFK Resume   - Allows you to continue an existing POSTing. This is              
  6994.                independent of the current article.                              
  6995. PFK Followup - Newly edited information to be sent back to the server           
  6996.                for POSTing.                                                     
  6997. PFK Mail     - Newly edited information to be directed to the local             
  6998.                electronic mail system (must fill in recipient).                 
  6999. PFK Reply    - Newly edited information to be directed to the creator           
  7000.                of an article (directed back to the "From:").                    
  7001. PFK ERASE    - Eliminate the previously edited POSTing to operate on            
  7002.                the current article.                                             
  7003. .pf                                                                             
  7004. .fo on                                                                          
  7005. :h3.Quit -                                                                      
  7006. :p.Quitting here will not exit the NNR program. There is a hierarchical         
  7007. relationship among routines. Whenever you QUIT a screen you will return         
  7008. to the place you started from. In this case you will be returned to the         
  7009. Article screen and the current article.                                         
  7010. :h3.Resume -                                                                    
  7011. :p.The first posting panel is set up to detect the presence of a                
  7012. previously started article using this facility. If an article is                
  7013. detected you have the option to "Resume" or "ERASE" it. When the                
  7014. previous article is resumed the current article is discarded. You will          
  7015. be able to pick up the previous article where you left off.                     
  7016. :h3.Followup -                                                                  
  7017. :p.When you follow-up on an article, you are replying back to the server        
  7018. and not the individual. NNR will do its best to preserve any information        
  7019. necessary to follow the prescribed conventions for posting. If for some         
  7020. reason you get interrupted, the newly generated article will be                 
  7021. preserved until you resume via the "Resume" PFK or erase it using the           
  7022. "ERASE" PFK. When the article has been successfully posted, it will             
  7023. also be logged in the "NNRPMLOG" notebook.                                      
  7024. :h3.Mail -                                                                      
  7025. :p.When mailing an article to a friend or colleague you need to know            
  7026. their electronic address. NNR will search through your names file for           
  7027. any nicknames. When you fill in the "To:" field you must use very               
  7028. specific formats (see Post Screen(2) Help). When the article has been           
  7029. successfully mailed, it will be logged in the "NNRPMLOG" notebook.              
  7030. :h3.Reply -                                                                     
  7031. :p.When you reply to an article you are directing your response to the          
  7032. individual who posted the article. The return address is taken from the         
  7033. current article. When the article has been successfully sent, it will be        
  7034. logged in the "NNRPMLOG" notebook.                                              
  7035. :h3.ERASE -                                                                     
  7036. :p.The ERASE PFK will eliminate the previously edited POSTing/Mailing           
  7037. and operate on the current article.                                             
  7038. .pa                                                                             
  7039. :h2.Post Screen(2)                                                              
  7040. :h3.General Help -                                                              
  7041. :p.Bear in mind when you post an article that you are representing both         
  7042. yourself and MITRE to a potentially large audience. On the SHLI/Group           
  7043. screen you will see an indicator of whether posting is an option or not         
  7044. (y=posting, m=moderated, n=noposting). You may post at the Group level          
  7045. where only the group name is supplied, the Header level where the               
  7046. subject is supplied in addition to the group name and at the Article            
  7047. level where all available information is incorporated. There are groups         
  7048. available for testing this activity; "mitre.test" and "misc.test" are           
  7049. two such groups.                                                                
  7050. :FIG place='inline'                                                             
  7051.                        *** NNR/VM (R_1.3.0) ***                         Post(2) 
  7052.                                                                                 
  7053.    Posting proceeds in stages. On this screen you are required to fill          
  7054.    in the highlighted fields and make any modifications to the header           
  7055.    area. When the needed information has been supplied, please select           
  7056.    from the PFK list below.                                                     
  7057.                                                                                 
  7058.   From: NNRPROD@MBVM.Mitre.Org (Paul Campbell)                                  
  7059.   Newsgroups: mitre.techbb                                                      
  7060.   Subject: Re: OR/MS Symposium                                                  
  7061.                                                                                 
  7062.                                                                                 
  7063.                                                                                 
  7064.                                                                                 
  7065.                                                                                 
  7066.                                                                                 
  7067.                                                                                 
  7068.                                                                                 
  7069.                                                                                 
  7070.                                                                                 
  7071.                                                                                 
  7072.  1= Help     2=          3= Quit      4=           5= Edit      6= Send         
  7073.  7=          8=          9=          10=          11=          12=              
  7074. ====>                                                                           
  7075. :FIGCAP.Sample Post Screen(2)                                                   
  7076. :eFIG                                                                           
  7077. :h3.Help -                                                                      
  7078. :p.The Help PFK will display the following information:                         
  7079.                                                                                 
  7080. .bf help                                                                        
  7081. .fo off                                                                         
  7082.   The Post Screen(2) allows you to modify any of the highlighted fields.        
  7083.   It is highly recommended that no field be left blank; in some cases the       
  7084.   MAIL or POST will fail. When sending MAIL use the following formats for       
  7085.   the "To:" header (nicknames are supported):                                   
  7086.                                                                                 
  7087.       userid   *or*   userid@nodeid   *or*   userid@nodeid.domain.ext           
  7088.                (* incorporate personal names as follows *)                      
  7089.    Firstname Lastname <userid@nodeid.domain.ext>                                
  7090.                        userid@nodeid.domain.ext  (Firstname Lastname)           
  7091.                                                                                 
  7092. PFK Help     - This Display.                                                    
  7093. PFK Quit     - Exit Post(2) screen.                                             
  7094. PFK Edit     - Establishes a limited XEDIT session. When you come               
  7095.                from the Article screen you will see the entire article          
  7096.                is supplied.                                                     
  7097. PFK Send     - Will POST/MAIL the results of the edit session. You will         
  7098.                receive confirmation that your contribution was                  
  7099.                successful.                                                      
  7100. .pf                                                                             
  7101. .fo on                                                                          
  7102. :h3.Quit -                                                                      
  7103. :p.Quitting here will not exit the NNR program. There is a hierarchical         
  7104. relationship among routines. Whenever you QUIT a screen you will return         
  7105. to the place you started from. In this case you will be returned to the         
  7106. article last read.                                                              
  7107. :h3.Edit -                                                                      
  7108. :p.Once you have either supplied the subject or allowed it to default           
  7109. you may create the text of your article. Using the Edit key will put you        
  7110. into an XEDIT session.                                                          
  7111. :h3.Send -                                                                      
  7112. :p.After concluding your XEDIT session you will be back on the main             
  7113. posting screen. The Send PFK will initiate either the posting or mailing        
  7114. process. You should receive some confirmation at the end of this                
  7115. process. If you decide to "quit" rather than "send" your article, it            
  7116. will be saved for the next time you enter this screen.                          
  7117. :h2.Xedit Screen (for Posting/Mailing)                                          
  7118. :h3.General Help -                                                              
  7119. :p.This is a simple Xedit environment. If you are not familiar with             
  7120. Xedit don't despair since the PFKs available will do most, if not all,          
  7121. the operations necessary to compose a note. There are two basic                 
  7122. mail/post scenarios. The first one is when you come from the Article            
  7123. Screen. In this case you will find the message-id and the contributor's         
  7124. name and address arranged in some conventional manner at the top of the         
  7125. note with the note itself to follow. In the second scenario where you do        
  7126. not come from the Article Screen, there is no other information                 
  7127. available to include. In this case you will see                                 
  7128. .fo off                                                                         
  7129.                                                                                 
  7130. * * * Top of File * * *                                                         
  7131. * * * End of File * * *                                                         
  7132.                                                                                 
  7133. .fo on                                                                          
  7134. and you will be supplying the rest. To get started move the cursor to           
  7135. the line that contains "Top of File" and press the PF2 key.                     
  7136.                                                                                 
  7137. :FIG place='inline'                                                             
  7138.                             *** NNR/VM (R_1.3.0) ***                            
  7139. Posting to comp.compilers                                                       
  7140.                                                                                 
  7141.                                                                                 
  7142.                                                                                 
  7143.                                                                                 
  7144.                                                                                 
  7145.                                                                                 
  7146.                                                                                 
  7147.                                                                                 
  7148.                                                                                 
  7149. * * * Top of File * * *                                                         
  7150. In article <monthly-Jan-92@comp.compilers>                                      
  7151. compilers-request@iecc.cambridge.ma.us (John R. Levine) writes:                 
  7152.                                                                                 
  7153. -------------------------- Original Message --------------------------          
  7154.                                                                                 
  7155.                                                                                 
  7156. Archive-name: compilers-faq                                                     
  7157. 1= Help     2= Add line 3= Quit      4= Sign     5= Save      6= ?              
  7158. 7= Backward 8= Forward  9= Del line 10= Rgtleft 11= Spltjoin 12= Cursor         
  7159.                                                                                 
  7160. ====>                                                                           
  7161.                                                             X E D I T  1 File   
  7162. :FIGCAP.Sample EDIT Screen                                                      
  7163. :eFIG                                                                           
  7164. :h3.Help -                                                                      
  7165. :p.The Help PFK will display the CMS help file for the CMS NOTE                 
  7166. command.                                                                        
  7167.                                                                                 
  7168. .bf help                                                                        
  7169. .fo off                                                                         
  7170. Help     - Returns help for CMS Note.                                           
  7171. Add line - Adds a line to the body of the note.                                 
  7172. Quit     - Returns to Post Screen(2).                                           
  7173. Sign     - Pulls in "userid Signature" file.                                    
  7174. Save     - Saves file so you may continue with post/mail process.               
  7175. ?        - Brings back previous command.                                        
  7176. Backward - Page Back.                                                           
  7177. Forward  - Page Forward.                                                        
  7178. Del line - Deletes a line from the body of the note.                            
  7179. Rgtleft  - Toggle right or left.                                                
  7180. Spltjoin - Split or Join a line.                                                
  7181. Cursor   - Toggle cursor between command line and cursor position.              
  7182. .pf                                                                             
  7183. :h1.Help                                                                        
  7184. :h2.General Help -                                                              
  7185. .fo on                                                                          
  7186. :p.A summary Help is available from any NNR screen by choosing the PF1          
  7187. key.                                                                            
  7188. :FIG place='inline'                                                             
  7189.                        *** NNR/VM (R_1.3.3) ***                            Help 
  7190.                                                                                 
  7191.  ** Headers Screen                                                              
  7192.   This screen collects pertinent info. from each article to display the         
  7193.   originator and something about the content, based on the selection            
  7194.   criteria (subject). CMS SUBSET honored; ENTER toggles cursor position.        
  7195.                                                                                 
  7196. PFK Help     - This display.                                                    
  7197. PFK Article  - Read a specific article. Cursor position respected.              
  7198. PFK Quit     - Exit Headers screen.                                             
  7199. PFK Selected - Mark each article at the "." with an "x". Mark as many as        
  7200.                desired, then press the Selected PFK.                            
  7201. PFK Post     - Initiates posting procedure. The group and subject are           
  7202.                passed to the posting screen. Cursor position respected.         
  7203. PFK Mrk2Here - Marks all articles as read up to the cursor position or          
  7204.                when cursor is on Command line, ALL articles are marked.         
  7205. PFK Backward - Scrolls backward one screen.                                     
  7206. PFK Forward  - Scrolls forward one screen.                                      
  7207. PFK Thread   - Collects articles based on subject.                              
  7208. PFK Reduce   - Eliminates read articles, "reduces" the number displayed.        
  7209. PFK Mrk/UMrk - Mark Article/UnMark Article toggle.                              
  7210. PFK NxtGroup - Moves to the next group in the SHLI list.                        
  7211.                                                                                 
  7212.  1= NNR_Help 2=          3= Quit      4=           5=           6=              
  7213.  7=          8=          9=          10=          11=          12=              
  7214. ====>                                                                           
  7215. :FIGCAP.Typical Help Screen (from Headers)                                      
  7216. :eFIG                                                                           
  7217. :h2.NNR_Help -                                                                  
  7218. :p.This PFK will invoke the system help for NNR.                                
  7219. :h2.Quit -                                                                      
  7220. :p.There is a hierarchical relationship among routines. Whenever you            
  7221. QUIT a screen you will return to the place you started from. In general,        
  7222. you may be returned to almost anywhere.                                         
  7223. :appendix                                                                       
  7224. :H1.Help at a Glance                                                            
  7225. .bf help                                                                        
  7226. :h2.Help PHLI/Main screen                                                       
  7227. .fo off                                                                         
  7228.   Primary High Level Index and PFK definitions. CMS SUBSET is honored.          
  7229.   ENTER toggles cursor position.                                                
  7230. Personal_Subscriptions - All those groups you are currently subscribed          
  7231.                          to. Treated the same as other HLIs.                    
  7232. New_Groups_Since_mm/dd/yy - All new groups since you last read the news         
  7233.                             or  7-30 DAYSBACK.                                  
  7234. news         - Description of news programs, etiquette and announcements.       
  7235. mitre        - Contains all mitre related groups.                               
  7236. PFK Help     - This display.                                                    
  7237. PFK All_News - Access all the news that is available. Articles read are         
  7238.                not remembered. Move cursor to desired topic and press           
  7239.                All_News PFK.                                                    
  7240. PFK Quit     - Exit NNR program.                                                
  7241. PFK New_News - Access news that is new to you according to "Groups Read"        
  7242.                file on your account. Articles read are remembered.              
  7243. PFK Backward - Scrolls backward one screen.                                     
  7244. PFK Forward  - Scrolls forward one screen.                                      
  7245. PFK Cursor   - Toggles between current cursor position and command line.        
  7246. :h2.Help SHLI/Groups Screen                                                     
  7247. .fo off                                                                         
  7248.   Move the cursor to a group and press Headers, Articles or Post PFK.           
  7249.   CMS SUBSET is honored. ENTER toggles cursor position.                         
  7250.                                                                                 
  7251. PFK Help     - This display.                                                    
  7252. PFK Articles - Access articles sequentially by article number. Starts with      
  7253.                the first available article. Cursor position respected.          
  7254. PFK Quit     - Exits this screen.                                               
  7255. PFK Headers  - Preferred path to articles. Collects subject and other           
  7256.                information for display. Cursor position respected.              
  7257. PFK Post     - Initiates posting procedure. Only group passed to the            
  7258.                posting screen. Cursor position respected.                       
  7259. PFK Mark     - Mark the group as been read, zeros the article count.            
  7260. PFK Backward - Scrolls backward one screen.                                     
  7261. PFK Forward  - Scrolls forward one screen.                                      
  7262. PFK UpdtGrp  - Updates the Group.                                               
  7263. PFK Sub/UnS  - Subscribe or UnSubscribe to a news group.                        
  7264. PFK U_Prefer - Tailor user environment.                                         
  7265. PFK Power    - Toggle between current Power setting. Initially OFF.             
  7266. :h2.Help Headers Screen                                                         
  7267. .fo off                                                                         
  7268.   This screen collects pertinent info. from each article to display the         
  7269.   originator and something about the content, based on the selection            
  7270.   criteria (subject). CMS SUBSET honored; ENTER toggles cursor position.        
  7271. PFK Help     - This display.                                                    
  7272. PFK Article  - Read a specific article. Cursor position respected.              
  7273. PFK Quit     - Exit Headers screen.                                             
  7274. PFK Selected - Mark each article at the "." with an "x". Mark as many as        
  7275.                desired, then press the Selected PFK.                            
  7276. PFK Post     - Initiates posting procedure. The group and subject are           
  7277.                passed to the posting screen. Cursor position respected.         
  7278. PFK Mrk2Here - Marks all articles as read up to the cursor position or          
  7279.                when cursor is on Command line, ALL articles are marked.         
  7280. PFK Backward - Scrolls backward one screen.                                     
  7281. PFK Forward  - Scrolls forward one screen.                                      
  7282. PFK Thread   - Collects articles based on subject.                              
  7283. PFK Reduce   - Eliminates read articles, "reduces" the number displayed.        
  7284. PFK Mrk/UMrk - Mark Article/UnMark Article toggle.                              
  7285. PFK NxtGroup - Moves to the next group in the SHLI list.                        
  7286. :h2.Help U_Prefer Screen                                                        
  7287. .fo off                                                                         
  7288.   You may change any of the values listed but do so carefully since it          
  7289.   is possible to run out of virtual storage!                                    
  7290.                                                                                 
  7291. Articles/Group - used to determine the upper limit for the number of            
  7292.   articles collected on "Headers Screen". Default is 300 articles.              
  7293.                                                                                 
  7294. Lines/Article - used to determine the upper limit for the number of lines       
  7295.   collected for an article on the "Article Screen". Default is 1500 lines.      
  7296.                                                                                 
  7297. Log/NoLog - you may switch between logging all outgoing mail/post and           
  7298.   not logging them. The default is "YES", log them.                             
  7299.                                                                                 
  7300. PFK Help     - This display.                                                    
  7301. PFK Quit     - Exit Preferences screen.                                         
  7302. PFK Rotate   - Range through possible configuration values.                     
  7303. :h2.Help Article Screen                                                         
  7304. .fo off                                                                         
  7305.   Most commands honored from the command line. I try to screen out              
  7306.   commands known to be disruptive to your NNR session.                          
  7307.                                                                                 
  7308.                                                                                 
  7309. PFK Help     - This display.                                                    
  7310. PFK Next     - Read the next article in the sequence.                           
  7311. PFK Quit     - Exit Article screen.                                             
  7312. PFK Previous - Read the previous article in the sequence.                       
  7313. PFK PostMail - Initiates posting procedure. The group and subject are           
  7314.                passed to the posting screen along with the article.             
  7315. PFK HeadBody - Toggles between headers+body and body only.                      
  7316. PFK Backward - Scrolls backward one screen.                                     
  7317. PFK Forward  - Scrolls forward one screen.                                      
  7318. PFK Print    - Sends the article to the virtual printer.                        
  7319. PFK Rot13    - Translates screen using a character rotation method.             
  7320. PFK Log      - Logs article in NNRLOG NOTEBOOK.                                 
  7321. PFK NxtGroup - Moves to the next group in the SHLI list.                        
  7322. :h2.Help Post Screen(1)                                                         
  7323. .fo off                                                                         
  7324.   You must come from the Article screen to get to Post Screen(1). This          
  7325.   screen allows you to determine how to redirect an article.                    
  7326.                                                                                 
  7327.                                                                                 
  7328. PFK Help     - This Display.                                                    
  7329. PFK Quit     - Exit Post(1) screen.                                             
  7330. PFK Resume   - Allows you to continue an existing POSTing. This is              
  7331.                independent of the current article.                              
  7332. PFK Followup - Newly edited information to be sent back to the server           
  7333.                for POSTing.                                                     
  7334. PFK Mail     - Newly edited information to be directed to the local             
  7335.                electronic mail system (must fill in recipient).                 
  7336. PFK Reply    - Newly edited information to be directed to the creator           
  7337.                of an article (directed back to the "From:").                    
  7338. PFK ERASE    - Eliminate the previously edited POSTing to operate on            
  7339.                the current article.                                             
  7340. :h2.Help Post Screen(2)                                                         
  7341. .fo off                                                                         
  7342.   The Post Screen(2) allows you to modify any of the highlighted fields.        
  7343.   It is highly recommended that no field be left blank; in some cases the       
  7344.   MAIL or POST will fail. When sending MAIL use the following formats for       
  7345.   the "To:" header (nicknames are supported):                                   
  7346.                                                                                 
  7347.       userid   *or*   userid@nodeid   *or*   userid@nodeid.domain.ext           
  7348.                (* incorporate personal names as follows *)                      
  7349.    Firstname Lastname <userid@nodeid.domain.ext>                                
  7350.                        userid@nodeid.domain.ext  (Firstname Lastname)           
  7351.                                                                                 
  7352. PFK Help     - This Display.                                                    
  7353. PFK Quit     - Exit Post(2) screen.                                             
  7354. PFK Edit     - Establishes a limited XEDIT session. When you come               
  7355.                from the Article screen you will see the entire article          
  7356.                is supplied.                                                     
  7357. PFK Send     - Will POST/MAIL the results of the edit session. You will         
  7358.                receive confirmation that your contribution was                  
  7359.                successful.                                                      
  7360. .pf                                                                             
  7361. :H1.Network News Transfer Protocol (Excerpt)                                    
  7362. .fo off                                                                         
  7363.                                                                                 
  7364.  Network Working Group                      Brian Kantor (U.C. San Diego)       
  7365.  Request for Comments: 977                   Phil Lapsley (U.C. Berkeley)       
  7366.                                                             February 1986       
  7367.                                                                                 
  7368.                       Network News Transfer Protocol                            
  7369.                                                                                 
  7370.                  A Proposed Standard for the Stream-Based                       
  7371.                            Transmission of News                                 
  7372.                                                                                 
  7373.  Status of This Memo                                                            
  7374.                                                                                 
  7375.     NNTP specifies a protocol for the distribution, inquiry, retrieval,         
  7376.     and posting of news articles using a reliable stream-based                  
  7377.     transmission of news among the ARPA-Internet community.  NNTP is            
  7378.     designed so that news articles are stored in a central database             
  7379.     allowing a subscriber to select only those items he wishes to read.         
  7380.     Indexing, cross-referencing, and expiration of aged messages are also       
  7381.     provided. This RFC suggests a proposed protocol for the ARPA-Internet       
  7382.     community, and requests discussion and suggestions for improvements.        
  7383.     Distribution of this memo is unlimited.                                     
  7384.                                                                                 
  7385.  1.  Introduction                                                               
  7386.                                                                                 
  7387.     For many years, the ARPA-Internet community has supported the               
  7388.     distribution of bulletins, information, and data in a timely fashion        
  7389.     to thousands of participants.  We collectively refer to such items of       
  7390.     information as "news".  Such news provides for the rapid                    
  7391.     dissemination of items of interest such as software bug fixes, new          
  7392.     product reviews, technical tips, and programming pointers, as well as       
  7393.     rapid-fire discussions of matters of concern to the working computer        
  7394.     professional. News is very popular among its readers.                       
  7395.                                                                                 
  7396.     There are popularly two methods of distributing such news: the              
  7397.     Internet method of direct mailing, and the USENET news system.              
  7398.                                                                                 
  7399.  1.1.  Internet Mailing Lists                                                   
  7400.                                                                                 
  7401.     The Internet community distributes news by the use of mailing lists.        
  7402.     These are lists of subscriber's mailbox addresses and remailing             
  7403.     sublists of all intended recipients.  These mailing lists operate by        
  7404.     remailing a copy of the information to be distributed to each               
  7405.     subscriber on the mailing list.  Such remailing is inefficient when a       
  7406.     mailing list grows beyond a dozen or so people, since sending a             
  7407.     separate copy to each of the subscribers occupies large quantities of       
  7408.     network bandwidth, CPU resources, and significant amounts of disk           
  7409.     storage at the destination host.  There is also a significant problem       
  7410.     in maintenance of the list itself: as subscribers move from one job         
  7411.     to another; as new subscribers join and old ones leave; and as hosts        
  7412.     come in and out of service.                                                 
  7413.                                                                                 
  7414.  1.2.  The USENET News System                                                   
  7415.                                                                                 
  7416.     Clearly, a worthwhile reduction of the amount of these resources used       
  7417.     can be achieved if articles are stored in a central database on the         
  7418.     receiving host instead of in each subscriber's mailbox. The USENET          
  7419.     news system provides a method of doing just this.  There is a central       
  7420.     repository of the news articles in one place (customarily a spool           
  7421.     directory of some sort), and a set of programs that allow a                 
  7422.     subscriber to select those items he wishes to read.  Indexing,              
  7423.     cross-referencing, and expiration of aged messages are also provided.       
  7424.                                                                                 
  7425.  1.3.  Central Storage of News                                                  
  7426.                                                                                 
  7427.     For clusters of hosts connected together by fast local area networks        
  7428.     (such as Ethernet), it makes even more sense to consolidate news            
  7429.     distribution onto one (or a very few) hosts, and to allow access to         
  7430.     these news articles using a server and client model.  Subscribers may       
  7431.     then request only the articles they wish to see, without having to          
  7432.     wastefully duplicate the storage of a copy of each item on each host.       
  7433.                                                                                 
  7434.  1.4.  A Central News Server                                                    
  7435.                                                                                 
  7436.     A way to achieve these economies is to have a central computer system       
  7437.     that can provide news service to the other systems on the local area        
  7438.     network.  Such a server would manage the collection of news articles        
  7439.     and index files, with each person who desires to read news bulletins        
  7440.     doing so over the LAN.  For a large cluster of computer systems, the        
  7441.     savings in total disk space is clearly worthwhile.  Also, this allows       
  7442.     workstations with limited disk storage space to participate in the          
  7443.     news without incoming items consuming oppressive amounts of the             
  7444.     workstation's disk storage.                                                 
  7445.                                                                                 
  7446.     We have heard rumors of somewhat successful attempts to provide             
  7447.     centralized news service using IBIS and other shared or distributed         
  7448.     file systems.  While it is possible that such a distributed file            
  7449.     system implementation might work well with a group of similar               
  7450.     computers running nearly identical operating systems, such a scheme         
  7451.     is not general enough to offer service to a wide range of client            
  7452.     systems, especially when many diverse operating systems may be in use       
  7453.     among a group of clients.  There are few (if any) shared or networked       
  7454.     file systems that can offer the generality of service that stream           
  7455.     connections using Internet TCP provide, particularly when a wide            
  7456.     range of host hardware and operating systems are considered.                
  7457.                                                                                 
  7458.     NNTP specifies a protocol for the distribution, inquiry, retrieval,         
  7459.     and posting of news articles using a reliable stream (such as TCP)          
  7460.     server-client model. NNTP is designed so that news articles need only       
  7461.     be stored on one (presumably central) host, and subscribers on other        
  7462.     hosts attached to the LAN may read news articles using stream               
  7463.     connections to the news host.                                               
  7464.                                                                                 
  7465.     NNTP is modelled upon the news article specifications in RFC 850,           
  7466.     which describes the USENET news system.  However, NNTP makes few            
  7467.     demands upon the structure, content, or storage of news articles, and       
  7468.     thus we believe it easily can be adapted to other non-USENET news           
  7469.     systems.                                                                    
  7470.                                                                                 
  7471.     Typically, the NNTP server runs as a background process on one host,        
  7472.     and would accept connections from other hosts on the LAN.  This works       
  7473.     well when there are a number of small computer systems (such as             
  7474.     workstations, with only one or at most a few users each), and a large       
  7475.     central server.                                                             
  7476.                                                                                 
  7477.  1.5.  Intermediate News Servers                                                
  7478.                                                                                 
  7479.     For clusters of machines with many users (as might be the case in a         
  7480.     university or large industrial environment), an intermediate server         
  7481.     might be used.  This intermediate or "slave" server runs on each            
  7482.     computer system, and is responsible for mediating news reading              
  7483.     requests and performing local caching of recently-retrieved news            
  7484.     articles.                                                                   
  7485.                                                                                 
  7486.     Typically, a client attempting to obtain news service would first           
  7487.     attempt to connect to the news service port on the local machine.  If       
  7488.     this attempt were unsuccessful, indicating a failed server, an              
  7489.     installation might choose to either deny news access, or to permit          
  7490.     connection to the central "master" news server.                             
  7491.                                                                                 
  7492.     For workstations or other small systems, direct connection to the           
  7493.     master server would probably be the normal manner of operation.             
  7494.                                                                                 
  7495.     This specification does not cover the operation of slave NNTP               
  7496.     servers.  We merely suggest that slave servers are a logical addition       
  7497.     to NNTP server usage which would enhance operation on large local           
  7498.     area networks.                                                              
  7499.                                                                                 
  7500.  1.6.  News Distribution                                                        
  7501.                                                                                 
  7502.     NNTP has commands which provide a straightforward method of                 
  7503.     exchanging articles between cooperating hosts. Hosts which are well         
  7504.     connected on a local area or other fast network and who wish to             
  7505.     actually obtain copies of news articles for local storage might well        
  7506.     find NNTP to be a more efficient way to distribute news than more           
  7507.     traditional transfer methods (such as UUCP).                                
  7508.                                                                                 
  7509.     In the traditional method of distributing news articles, news is            
  7510.     propagated from host to host by flooding - that is, each host will          
  7511.     send all its new news articles on to each host that it feeds.  These        
  7512.     hosts will then in turn send these new articles on to other hosts           
  7513.     that they feed.  Clearly, sending articles that a host already has          
  7514.     obtained a copy of from another feed (many hosts that receive news          
  7515.     are redundantly fed) again is a waste of time and communications            
  7516.     resources, but for transport mechanisms that are single-transaction         
  7517.     based rather than interactive (such as UUCP in the UNIX-world <1>),         
  7518.     distribution time is diminished by sending all articles and having          
  7519.     the receiving host simply discard the duplicates.  This is                  
  7520.     especially true when communications sessions are limited to once a          
  7521.     day.                                                                        
  7522.                                                                                 
  7523.     Using NNTP, hosts exchanging news articles have an interactive              
  7524.     mechanism for deciding which articles are to be transmitted.  A host        
  7525.     desiring new news, or which has new news to send, will typically            
  7526.     contact one or more of its neighbors using NNTP.  First it will             
  7527.     inquire if any new news groups have been created on the serving host        
  7528.     by means of the NEWGROUPS command.  If so, and those are appropriate        
  7529.     or desired (as established by local site-dependent rules), those new        
  7530.     newsgroups can be created.                                                  
  7531.                                                                                 
  7532.     The client host will then inquire as to which new articles have             
  7533.     arrived in all or some of the newsgroups that it desires to receive,        
  7534.     using the NEWNEWS command.  It will receive a list of new articles          
  7535.     from the server, and can request transmission of those articles that        
  7536.     it desires and does not already have.                                       
  7537.                                                                                 
  7538.     Finally, the client can advise the server of those new articles which       
  7539.     the client has recently received.  The server will indicate those           
  7540.     articles that it has already obtained copies of, and which articles         
  7541.     should be sent to add to its collection.                                    
  7542.                                                                                 
  7543.     In this manner, only those articles which are not duplicates and            
  7544.     which are desired are transferred.                                          
  7545.                                                                                 
  7546. :egdoc                                                                          
  7547.